Reply To: Noise shaped dither – Does it cause issues with DSP-based volume controls?

March 21, 2023 at 1:44 pm #5540

Bob, I recall this being discussed at AES paper or workshop sessions in the Lipshitzian era.  The question was specifically, if your fixed-point DSP (in those days it was the Mot 56K) did no dithering internally but the input signal to the DSP processing had some kinda dither added, just to keep all those internal states sorta hopping around a little all the time.  Then, hopefully, the effects of quantization of those states will sorta get averaged out a little.

Now I dunno an actual study, either theoretical or experimental, that explores how well noising up the input does to rid us of the buzzing and other nasties of quantization later down the signal path.

Now, a DSP volume control is just a multiplication.  Multiply by 1 and that’s 0 dB.  Multiply by 1/4 and that’s -12 dB gain.  Or by 2 and it’s +6 dB.  Multiply by 0 and that’s -∞ dB.  Now, the result of the multiplication is that your 24-bit word has become a 47-bit word and you will eventually need to lose the bottom 23 bits so that the output word is back in the same form as the input.  Losing those bottom bits is quantization and , if the signal gets really quiet, that quantization will sound like buzzing.  After all, it takes your tiny sine wave and turns it into a tiny square wave.  Adding dither before that quantization adds a little noise, but it takes out the buzz completely.  So, in my opinion, the DSP coders doing that volume control are awful goddamn lazy to not dither the quantization that occurs after the scaling that the volume control does.

Now, *I’m* a little lazy, and I did not (and do not) dither every quantization I had in my DSP processes.  The simplest way to avoid the need to dither is to maintain a wide word (like 64-bit or 80-bit double precision) internally in your algorithm until you get to your final output word that is getting cast back into a 24-bit integer and sent out to AES/EBU or S/PDIF or to a DAC (or written to a .wav file).  That’s when you want to take the time and effort to properly dither the 64-bit float as you toss out bits to get your 24-bit fixed output.  (You will also have to check for overshoot and saturate the value to the rails at that point.)