| Michael Gogins wrote:
> It is simply not true that Csound's internal precision equals or exceeds
> that of professional audio gear. This may be true of some semi-professional
> gear, but it is not at all true of really high-end gear.
Great! So if you believe that 24-bit, 96Ks/s audio is essential and that
every LSB is sacred, compile Csound with doubles, set sr=96000 and kr=96000,
output in floats or 32-bit ints, and be happy. But why force this on the
rest of us?
I can easily see why audio gear using fixed-point computation would need
at least 48-bit internal data to avoid overload. (16-bit level X 24-bit
sample is 40 bits; summing 64 channels of these would need 8 more bits
of overhead; scale only on output.) Floating point has some real
advantages--a 32-bit float has 254 bits of dynamic range. And given how
much DSP power a few dollars buys these days, if the chip your mixer is
built on supports 64-bit floating point, why not use it? In a mixing application, you have cycles to burn. It looks good on the spec sheet,
anyway. But is it audibly better than 32-bit floating point? IMHO, no.
> The human ear has a precision of somewhere between 24 and 32 bits.
Where does this number come from? And doesn't it conflate resolution
and dynamic range? The 96dB dynamic range of 16-bit samples is arguably
too small, but that's different than saying that 16-bit resolution is too
small. There is much less evidence of the latter, and the arguments
I've heard for adding more than a bit or two of resolution have amounted
to hand-waving, at best.
> Assume
> that the digital audio samples coming into a system are 32 bits. Only a few
> arithmetic operations are required to introduce audible noise and blurring
> into the signal.
Where in the (real) world are you going to get 32-bit samples? Even pro
A/D's only give you 20 bits or so above noise floor (120dB s/n ratio).
> If, however, 64 or 80 bit samples are used, dozens of
> operations can be performed without the noise floor cutting into the 32 bits
> of the input signal.
That's a 192dB noise floor you're talking about, there.
> As a result, there will be no audible degradation of
> the signal by round-off errors. Even if only 24 bits of precision are coming
> into the system, it will only take a dozen or so operations to raise the
> noise floor.
Well, actually, only one, since 32-bit floats have 24-bit mantissas. But
24 bits represents a 144dB noise floor. Error estimation for floating-
point calculation is notoriously difficult (dissertations are written on
it), but in the cases of scaling (multiplication) and mixing (addition),
we gain about 1/2 LSB of noise for each operation. Thus we've lost a bit
less than 6 bits (log2 (100 * 1/2)) after 100 operations. Our noise floor
is now around 110dB--for any musical purpose, still inaudible; it's way below
the 96dB maximum of a CD (a figure rarely achieved in practice). And
we've assumed that we're mixing samples of roughly the same level--the
effective noise floor increases if a few signal sources predominate.
> This is not a great deal of filtering or mixing, and makes it
> very clear why professional gear tends to shoot for at least 40 bits.
See my first paragraph--there are other reasons for this.
> If Csound were to follow standard professional audio engineering practice,
> it would support its 32 bit inputs and outputs with 64 or 80 bit internal
> samples.
"Support," yes. Mandate, no.
I've no more free time for this (or any) discussion at this point. It's
only my opinion, but I'll let it stand or fall on its merits: there are
few musically justifiable reasons for the general use of 64-bit floating
point in Csound. On most, if not all, platforms it increases performance
times with little justification. A few opcodes might be usefully improved
by using it internally, but this should be decided on a case-by-case basis.
Run-time performance matters, for very practical reasons.
And one final opinion: The ultimate test of any feature or change in Csound
should be its utility to the composer, period.
-Ed
|