When is dither necessary?

@bachstudies : Thought I’d start a new topic.

What Chris was showing via his plugin was that once pushed really high (by about 17-bits worth!) and essentially re-converted (?) to 32-bit float and brought back down is that there would be some evidence of truncation.

Using a car analogy Chris throws sand in the engine then says “This engine is broken. Over here I have an engine that will run with sand in it.” You could use the sand proof engine or you could avoid throwing sand in the engine in the first place (using 102 dB of gain) :slight_smile:

Right on. Still cool that he was able dither float though :wink:

It sounds to me that 32-bit float and associated summing has rather muddied good gain-staging practices. Harrison’s Mixbus really got me thinking about proper levels throughout the signal path. I think it still holds to be the best way of doing things? Certainly 64-bit summing completely moves any truncation distortion away from the 24-bit fixed arena but even then we would have to make sure that the DAW (not Ardour at this point) and plugins all operate at 64-bit float.

And to answer the OP question, the received wisdom seems to be to dither whenever bit depth is reduced i.e. from 32-bit float to 24-bit, 24-bit to 16-bit etc. At the same time, I acknowledge @x42’s point about thermal noise!

Dithering is never necessary.

When mastering to 16bit it can be a safeguard, a few extra dB below -96dBFS. But even for classical music with large dynamic range it’s completely inaudible when the final master is at -1dBTP and average loudness at -23 LUFS. The noise-floor (and harmonic distortion due to truncation) is so low that you need special lab equipment and a treated room to even reproduce the sound in air accurately.

That’s just marketing, really. They want you to by a new PC because 32 bit DSP on modern 64bit processors can be twice as fast.

The noise added due to rounding errors after N worst-case 32bit floating point operations is 20 * log10 (N * (2^-23)) dB. – It requires around 8388 worst-case float operations to reach -60dBFS. – Now if you’re having constant bad luck and need to sum > 8000 tracks, and need > 60dB dynamic range. Then yes.

Also keep in mind that you run into physical limits. At room temperature and audio-sample-rates, everything below bit 20 is just thermal noise.

EDIT: to clarify, it doesn’t hurt to dither when truncating a signal.

1 Like

You are certainly convincing in your arguments! I do keep looking over my shoulder at Chris Johnson’s work but if you are convinced it is completely out of the realm of possibility that truncation vs dither makes any difference in the real world, then I believe you.

I suggested earlier that many classical engineers peak harpsichord and other solo instruments down at -6 dB so that listeners are not shocked when playing back at their default volume knob position. And, let’s say that people (me, included) enjoy listening at approximately the right SPL for the ensemble on the disc (as if they were sitting in the first row of a concert hall or stood on the conductor’s podium). My one question is at what peak level, LUFS integrated and/or SPL would these things be noticeable, even a little?

And just to clarify, when you say “worst-case” are you referring to pushing a 32-float file all the way to its highest possible dB gain (c. 770 dB) or simply going somewhere above 0dBFS?

I am leaving the dithering conversation for Robin, who has it covered much more thoroughly than I could from a technical level. But gain staging is another matter;)

Short version, ALWAYS properly gain stage. If you insert a plugin you can’t guarantee how said plugin will act or if it will give you proper control to handle -60dB ‘average’ material from improper gainstaging. Similarly even in Mixbus, to weak a signal can cause issues with practical operation of the leveler for instance, just because you only have so much range to work with for the threshold of the compressor. Now if it was properly gain staged to start with, then you wouldn’t have an issue throughout any of Mixbus’s processes, so don’t take that to mean I am saying there is any problem here, it is just reinforcement that you must gain stage properly for DSP processes, especially since many of them assume it will happen anyways.

Now will you have as much problem with clipping between processes? Not necessarily, but again if you use external plugins all bets are off as it depends on how that plugin is implemented.

     Seablade
1 Like

So, I’ve gone down a bit of a rabbit hole at this point and while getting clarity about some things feel more confusion about others. A suppose adding a small amount of dither to my thoughts might help? :wink: With two kids in the house, there’s always some noise in my head…

In all seriousness, does truncation distortion only ever affect the least significant bit? As in, does pushing a 32-bit float file into the +3dBFS territory and then processing have the same rounding errors as pushing a float file +500dBFS with subsequent processing? Would the two files null if brought back to values between -1 and 1? It is simply the number of tracks/processes that adds up the rounding distortion?

Depends on the processing, but in general, yes. It cancels out. If you use gain-factors that are power-of-two it also cancels bit exact.

I’ve just pushed Lua scripted Amplifier plugin to ardour/git that allows to specify precise gain as ratio. This allows to e.g. multiply by 128, then divide by 128.

Example session below convolves some generated pink-noise with a some hall impulse response at different signal levels

Bus 1: just the convolution effect.
Bus 2: polarity of the signal is inverted, then 120.4dB of gain are added, then the signal is convolved, and finally then the signal is attenuated by 120.4dB.

Summed on the master-bus they cancel bit-exact:

If you don’t pick 2^n as gain-factor, it depends on the processing. Simple sums will only affect the lowest bit, other operations such as convolution can affect more. It depends on the number of processing steps that are performed.

I suggest you experiment for yourself.

2 Likes

OK! And just one more question: if operations end up affecting more than the LSB how does this compare with the previously mentioned “worse case” scenario? Still needing >8000 tracks to hit -60dB or is that number brought lower? All hypothetical, of course, given I engage in safe gain-staging practices :wink:

The math does not change.

It’s 8000 worst-case processing operations. e.g. sum 8k tracks. - A single EQ does a couple math operations internally. A typical biquad for example would do 5 multiplications and 4 sums.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.