[LAU] Dithering...should we dither about it?

From: Grekim Jennings <grekimj@email-addr-hidden>
Date: Sun Mar 02 2014 - 15:11:58 EET

On 03/02/2014 04:38 AM, Harry van Haaren wrote:
>/ On Sun, Mar 2, 2014 at 2:43 AM, david <gnome at hawaii.rr.com <http://lists.linuxaudio.org/listinfo/linux-audio-user>
/>/ <mailto:gnome at hawaii.rr.com <http://lists.linuxaudio.org/listinfo/linux-audio-user>>> wrote:
/>/ > On 03/01/2014 08:51 AM, Harry van Haaren wrote:
/>/ >> I generally export to 32bit float .flac... so no dithering (or burning
/>/ >> to CD's :)
/>/ > Hmm, I thought FLAC only did 24-bit???
/>/ I think the FLAC spec says it will handle anything from 4-32 bit-depth:
/>/ https://xiph.org/flac/faq.html#general__samples
/>/ That said, Audacity only has FLAC export options of 16 & 24 bit depths.
/>/ Ardour supports 8, 16 and 24. Still no 32 bit float support (at
/>/ application level).
/
24bit integer is equivalent to 32bit float in terms of resolution, and
pretty much identical as long as the float samples are clamped between
-1.0f and 1.0f.

>/ I should correct my previous statement though: I *thought* I exported
/>/ 32bit float: but it turns out they're 24bits (from Ardour3), dithering
/>/ set to None. And cropping the resulting output in Audacity and exporting
/>/ was to 16-bit PCM, so I was actually doing this all wrong (no dithering,
/>/ 32 -> 24 -> 16).
/>/
/>/ A better workflow would be to:
/>/ A) Ardour export 32 bit float -> 16bit (with dither) -> Audacity 16bit
/>/ in, crop, 16bit out
/>/ B) Ardour export 32 bit -> 24 bit (no dither) -> Audacity 24bit in,
/>/ crop, export 16bit (with dither).
/>/
/>/ The important part being to not dither twice, since then you'll be
/>/ adding noise to the signal twice!
/
actually, you *must* dither at every truncation step - if you don't, you
will lose information _and_ introduce signal-dependent requantisation
noise, which can never be removed again.
so the best approach is to only reduce the wordlength once, at the very
end of the chain, before going to CD.

some mastering people (bob katz among them) even go as far as demanding
dither at every level control in the chain.

however, if you are exporting from JACK's native 32bit float to 24bit
int _and_ you make sure that there is no sample larger than full-scale
(floats are funny :), then there is no actual loss of information, and
no dithering is required. all you do is map the 23 mantissa bits and the
sign bit of the float to the 24 bits of the integer.

-- 
Jörn Nettingsmeier
Lortzingstr. 11, 45128 Essen, Tel. +49 177 7937487
Meister für Veranstaltungstechnik (Bühne/Studio)
Tonmeister VDT
http://stackingdwarves.net
I just wanted add a couple thoughts.  First, the level of the dither
signal that you add depends on the target bit depth.  So the dither for
24 bits is generally 8 bits (48 dB) softer than a dither for 16 bits.
Therefore, there is is nothing wrong with dithering one or more times to
24 bits.  Keep in mind that quantization distortion or dither noise will
both be some 24 dB's below the threshold of hearing in a 24 bit file. I
wouldn't be particularly worried about either, but dither is much better
to have. I think you may run into issues if you use noise-shaped dither
repeatedly.  Or, using noise shaped dither followed by equalization would
not be good in the sense that you could make the dither more audible.
There also may be issues with dithering floating point material since the
actual level of the musical signal is a bit of a moving target.
So, I would really only make sure about dithering one time as the absolute
last step in mastering to 16 bits.  And if you have any thoughts about futher
processing of a 16 bit track, do not used noise-shaped dither.
Grekim
www.acousticrefuge.com/mixer4.htm

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sun Mar 2 16:15:04 2014

This archive was generated by hypermail 2.1.8 : Sun Mar 02 2014 - 16:15:04 EET