[music-dsp] 32 bit floats >>> 24 bit integer

Nigel Redmon earlevel at earlevel.com
Fri Jan 20 03:11:04 EST 2006

That's why I hedged "in general" and "if you do you final adjustment  
for audio level before the conversion". Almost always, in a case  
where you need to do what the op is asking, you are doing your  
computing in floating point, and converting so that you can send it  
to a D/A for output. I suppose the "don't bother" is good for 99% of  
the cases where this question is asked, and for the other 1%, 99% of  
those cases no one could tell the difference under the best of  

I'm trying to think of a case where audio in general (not a specific  
repeating signal) could get stuck on a limit cycle with a truncated  
24-bit signal versus a dithered version of the same... but anyway,  
the answer was assuming that the conversion wasn't followed by  
further processing.

I have to think that the vast majority of music and recording  
software, synths, and sound processors in the real world don't  
bother--but hey, if you have time and motivation, it doesn't hurt.

On Jan 19, 2006, at 8:09 PM, robert bristow-johnson wrote:

>> On Jan 19, 2006, at 2:16 PM, kernel wrote:
>>> hello,  what's the best way to convert from 32 bit floating point
>>> audio to 24 bit integer whilst retaining the best audio quality.
>>> are we talking simple truncation and a splash of dither?  these are
>>> multichannel files so I guess it would be best to dither the mix
>>> bus instead.
> on 01/19/2006 18:03, Nigel Redmon at earlevel at earlevel.com wrote:
>> Generally speaking, there is no sense in wasting computing power to
>> dither a signal to 24 bits. If you're going to play back the 24-bit
>> value at some point, good luck getting a D/A and repro system whose
>> noise floor wouldn't bury the effects of the dither--short of using
>> cryogenics (the LSB is -144 dB full scale). 32-bit floats have
>> roughly the same resolution at "full code" as 24-bits (24-bit
>> mantissa plus sign bit, compared to 24-bits including sign for 24-bit
>> ints); floats have an advantage in dynamic range, but if you do your
>> final adjustment for audio level before the conversion, as you
>> should, the two come out even. Dither when you need to output to
>> shorter word lengths.
> i think it's a good idea to dither and/or noise shape, if you can  
> afford the
> computational bandwidth.  even for 24 bit fixed point.  there is  
> little to
> be lost (1 bit) with it's "full code", but for signals less than -6  
> dB FS,
> even more bits are chopped off.  if more processing is done to the  
> 24 bit
> audio downstream, doing crappy truncation can bite you down there.   
> i know
> the OP isn't explicitly talking about feedback, but if the  
> truncated 24 bit
> fixed-point signal *was* recirculated back for some reason (like IIR
> filtering) you can have a case of getting stuck on a DC value due  
> to limit-
> cycling.
> it's amazing, a quarter century ago (at the birth of the CD), 16  
> bits were
> supposed to be enough, then 18, then 20, then 24.  i am not sure that
> intermediate audio, before mastering a finished product (to 16 bits  
> or to
> MP3 or whatever), will be satisfied at 24.  if the bits beyond 24  
> have any
> value at all, there might be value in properly truncating them.   
> think of
> dither as a dignified death for those bits so deserving.  maybe  
> after 32 or
> 48 bits, the remain bits deserve to be treated like dog shit, but i  
> wouldn't
> do that to the 25th or 26th bit.  if you're gonna decapitate them,  
> afford
> them a little dignity with some dither and/or noise shaping.  at  
> least if
> you can afford it.
> -- 
> r b-j                  rbj at audioimagination.com

More information about the music-dsp mailing list