Csound Csound-dev Csound-tekno Search About

[Csnd] rendering with 64bit precision

Date2009-01-06 17:52
From"Jason Timm"
Subject[Csnd] rendering with 64bit precision
AttachmentsNone  None  

Date2009-01-10 08:59
From"Chuckk Hubbard"
Subject[Csnd] Re: rendering with 64bit precision
AttachmentsNone  

Date2009-01-10 16:29
From"Jason Timm"
Subject[Csnd] Re: Re: rendering with 64bit precision
AttachmentsNone  None  

Date2009-01-10 17:05
From"Michael Gogins"
Subject[Csnd] Re: Re: Re: rendering with 64bit precision
AttachmentsNone  

Date2009-01-10 18:31
From"Jason Timm"
Subject[Csnd] Re: Re: Re: Re: rendering with 64bit precision
AttachmentsNone  None  

Date2009-01-10 20:01
Fromjpff@cs.bath.ac.uk
Subject[Csnd] Re: Re: Re: Re: Re: rendering with 64bit precision
If you use the double build all internal opertions are in double
precision.  The filed representation is converted at the time of output,
not when processed.

The format SF_FORMAT_W64 is 64bit  and subformat SF_FORMAT_DOUBLE look
hopeful.  Not sure if we make that easy to use.

==John ff

> Okay, thanks Michael,
> this helps a lot.
>
> What I'm trying to understand is *how* csound, if it can be done with
> either
> 32 bit or 64 bit application builds, processes the mathematical
> computations
> with 64 bit precision. i.e - floats represented with 2^64
> precision(doubles). I've seen and heard examples of quantization error
> with
> float samples. It does happen. I'm not super anal about this, jut
> investigating and designing a work flow.
>
> Ultimately sound files will probably be archived at 32 bit and quantized
> to
> 16 bit lengths for distribution.
>
> I initially thought there could be an doubles flag - like -f except -d(I
> know this means something else).
>
> Is all this daft? I'm just trying to figure it out.
>
> Jason
>
>
> On Sat, Jan 10, 2009 at 12:05 PM, Michael Gogins
> wrote:
>
>> Let us distinguish....
>>
>> Csound can be a 32 bit application, or a 64 bit application. That it
>> is, it can be built to run on a 32 processor or a 64 bit processor.
>> Normally, Csound is a 32 bit application but, in the future, Csound
>> will normally be a 64 bit application.
>>
>> Csound, whether it is a 32 bit application or a 64 bit application,
>> can use 32 bit floating point numbers ("floats") to represent audio
>> samples, or it can use 64 bit floating point numbers ("doubles") to
>> represent samples. This is not the same thing as the above. 32 bit
>> samples run a bit faster on some systems (maybe), 64 bit samples are
>> more precise and occasionally sound a bit better.
>>
>> Csound, whether it is 32 bit or 64 bit as an application and whether
>> it uses 32 bit or 64 bit audio samples, can write soundfiles in
>> various formats such as 16 or 24 bit ints, floats, or doubles. This is
>> not the same as either of the above.
>>
>> Regardless of what kind of Csound you have -- 32 or 64 bit app, or
>> float or double samples -- you can write a float soundfile using the
>> -f Csound command line option, or you can write a double soundfile
>> using the --format=w64 option.
>>
>> Hope this helps,
>> Mike
>>
>>
>>
>> On 1/10/09, Jason Timm  wrote:
>> > Hey Chuckk,
>> > I'm Mac 10.5.6.
>> >
>> > I had both frameworks(32/64) installed, the problem's invoking the
>> doubles
>> > version when desired. From reading the manual this should be possible
>> or
>> > maybe I'm misunderstanding something. I switched to a lone doubles
>> build
>> run
>> > from the command line - none of the GUIs work with the 64v on my
>> machine.
>> >
>> > BTW - csound~ seems broken by 5.10.
>> >
>> > Jason
>> >
>> >
>> > On Sat, Jan 10, 2009 at 3:59 AM, Chuckk Hubbard
>> > wrote:
>> >
>> >> As far as I know that's something only decided while compiling
>> Csound.
>> >>  If you want to have both options available, you'll need two copies
>> of
>> >> Csound.  If you're compiling from source, you can make them from the
>> >> same source.  What OS are you using?
>> >>
>> >> -Chuckk
>> >>
>> >> On Tue, Jan 6, 2009 at 7:52 PM, Jason Timm 
>> wrote:
>> >> >
>> >> >
>> >> > How to render with double precision floats? I'm not seeing a flag.
>> >> > J.
>> >>
>> >>
>> >>
>> >> --
>> >> http://www.badmuthahubbard.com
>> >>
>> >>
>> >> Send bugs reports to this list.
>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe
>> >> csound"
>> >>
>> >
>> > Send bugs reports to this list.
>> > To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe
>> > csound"
>>
>>
>> --
>> Michael Gogins
>> Irreducible Productions
>> Michael dot Gogins at gmail dot com
>>
>>
>> Send bugs reports to this list.
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
> Send bugs reports to this list.
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"



Date2009-01-10 20:03
From"Michael Gogins"
Subject[Csnd] Re: Re: Re: Re: Re: rendering with 64bit precision
AttachmentsNone  

Date2009-01-11 06:28
FromAnthony Kozar
Subject[Csnd] Re: rendering with 64bit precision
Jason, 

I believe that the OS X packages overwrite each others' commandline binaries
(and possibly stuff in /Applications too) so whichever version you installed
last will be the current one.  I also think Victor mentioned that the GUIs
in /Applications will not work with the doubles version yet.  You might try
just making copies of the GUIs inbetween installing the two packages.

Note that the frameworks do have different names so they can coexist
together.

Here is a solution for the commandline binaries:

1. Install the doubles build.
2. Open Terminal and cd /usr/loca/bin
3. Save the following script as a file named csound-rename, chmod a+x it,
and run it as the root user (i.e. sudo csound-rename) and supplying a suffix
such as "64"  (beware of wrapped lines in this email):

#!/bin/sh

# csound-rename:
#
# This script renames the standard Csound binary executables by appending
# the suffix specified as the first argument on the commandline.  The
# binaries are assumed to be in the current directory.
#
# Example:   csound-rename 64
#   will rename 'csound' to 'csound64', 'cvanal' to 'cvanal64', etc.
#
# Example 2: csound-rename -5.09
#   will rename 'csound' to 'csound-5.09', 'cvanal' to 'cvanal-5.09', etc.

CSOUNDBINS="atsa cs csb64enc cseditor csound cstclsh cswish cvanal dnoise
envext extract extractor het_export het_import hetro lpanal lpc_export
lpc_import makecsd mixer pv_export pv_import pvanal pvlook scale scot scsort
sdif2ad sndinfo srconv"

for f in $CSOUNDBINS; do
    mv -n -v "./$f" "./${f}$1"
done

# end of script


4. Install the floats build.  You will now have two sets of commandline
binaries, one for floats, one for doubles.
5.  Optionally, run csound-rename again with say "32".
6.  Optionally use this script to select between the two installations:


#!/bin/sh

# csound-select:
#
# This script creates symbolic links to a set of standard Csound binary
# with the same suffix $1 from the "canonical" suffixless names of the
# programs.  The suffix is specified as the first argument on the
commandline.  
# The binaries are assumed to be in the current directory.
#
# Example:   csound-select 64
#   will link 'csound' to 'csound64', 'cvanal' to 'cvanal64', etc.
#
# Example 2: csound-select -5.09
#   will link 'csound' to 'csound-5.09', 'cvanal' to 'cvanal-5.09', etc.

CSOUNDBINS="atsa cs csb64enc cseditor csound cstclsh cswish cvanal dnoise
envext extract extractor het_export het_import hetro lpanal lpc_export
lpc_import makecsd mixer pv_export pv_import pvanal pvlook scale scot scsort
sdif2ad sndinfo srconv"

for f in $CSOUNDBINS; do
    ln -s -v "./${f}$1" "./$f"
done


Hope that this helps!

Anthony


Jason Timm wrote on 1/10/09 11:29 AM:

> Hey Chuckk,
> I'm Mac 10.5.6.
> 
> I had both frameworks(32/64) installed, the problem's invoking the doubles
> version when desired. From reading the manual this should be possible or
> maybe I'm misunderstanding something. I switched to a lone doubles build run
> from the command line - none of the GUIs work with the 64v on my machine.


Date2009-01-11 14:49
From"Jason Timm"
Subject[Csnd] Re: Re: rendering with 64bit precision
AttachmentsNone  None