Csound Csound-dev Csound-tekno Search About

Re: double/float times

Date1999-06-14 05:33
FromMichael Gogins
SubjectRe: double/float times
Thanks for taking the time to make this test.

>From my point of view, if there is an audible difference between single and
double precision floats, and if the sound processing is NOT broken, it can
safely be assumed that the double precision version is... more precise.

Although to the (Ed Hall, anyway) audience there may not be an esthetic
difference, the more precise rendering should in general be superior for the
artist, by virtue of offering more control.

Could you post or mail me the wrapper script so that I can try this myself?

-----Original Message-----
From: Ed Hall 
To: The CSound mailinglist 
Date: Thursday, June 10, 1999 8:57 PM
Subject: double/float times


>This was done in a great deal of haste, but given some of the claims
>made here I just had to make a small test.  In essence, I start with the
>wrapper script I used to allow Csound to compile on 64-bit machines
>and modified it to convert float to double throughout Csound.  It took
>all of fifteen minutes to produce two binaries for Csound 3.54, one
>with floats, the other with doubles.  For all I know, the latter is
>broken 100 different ways, but at least it ran the "Xanadu" orc and sco
>that have been used for benchmarking.  (See:
>
>    http://members.tripod.com/~slinkP/pw_linux/csbench.html
>
>for the benchmark.)
>
>Here are the results:
>
>    float:    95.72 seconds
>    double:  107.47 seconds
>
>So the double version is about 12% slower.  Details:
>
>   Dell D333XP 333MHz: Pentium II w/128MB RAM runing RedHat 5.2 Linux.
>   Csound 3.54 Compiled with EGCS 1.1.2, options "-O3".  16-bit IRCAM
output.
>
>I've listened to the outputs of both versions a couple of times, and
>there are very slight differences which appear to have to do with
>oscillator phasing (the beats between voices toward the end of the
>piece sound just slightly different).  This may be an actual difference
>due to 32- vs. 64-bit floating point, or may be some breakage due to
>the rather blunt way I did the conversion.  Aesthetically, they were
>equivalent--there certainly wasn't anything that would make me prefer
>one over the other.
>
>This is really more time than I ever intended to spend on this issue.
>Someday I'll benchmark more scores and more platforms, but you'll have
>to wait...
>
> -Ed
>
>

Date1999-06-14 09:37
FromEd Hall
SubjectRe: double/float times
> Although to the (Ed Hall, anyway) audience there may not be an esthetic
> difference, the more precise rendering should in general be superior for the
> artist, by virtue of offering more control.

I don't disagree that the extra precision might be useful.  But it's wasted,
in my opinion, when used to pipe audio around, or in constructing ftables
where interpolation error will be many times larger than single-precision
roundoff error.  In brief, the "control" I want is the ability to select
when and where 64-bit precision is used.  As for any slight difference in
the behavior of phasors (whether explicit or implied by oscil and friends),
that was one of the few effects I expected from the change in precision--
so I was expecting to hear it.  On further listening I'm much less sure
that there is any audible difference between the two, although on the
16-bit sample level the two sound files are definitely numerically different.  

BTW, I lose about 19% on Alpha when going from float to double--which is
the difference from running the Xanadu benchmark in real time, or not-quite-
real-time.

		-Ed