Noise shaping

A simple demonstration of what noise shaping sounds like and why you should use it.

Audacity will by default apply “dither” whenever you reduce the bit depth of some audio. The reason for this is that when you reduce the bit depth, the number of available amplitude values that a sample can take is reduced, which will inevitably cause “rounding off” errors when the new sample values are calculated. These errors are not really noticeable on most of the audio, but will cause some unpleasantness for very low level sounds,
(A more detailed explanation can be found here: )

For this experiment I generated a low level 440Hz tone (-80dB) as a 32bit mono track. When listening through a reasonable sound system, this tone quiet, but clearly audible.
I then changed the bit depth down to 16 bit.

I repeated this with 4 identical samples, but each time with different settings in Preferences for “Dither”.

The results are:
Shaped dither: quite a lot of high frequency noise, but the original tone still clear.
Triangle dither: the noise is more broadband, but still biased toward higher frequencies and the tone is still clear.
Rectangle dither: the noise has become yet more broadband but the tone is still clear.
No dither: As expected, there is no dither noise, but the tone now sounds horribly distorted.

When playing at normal volume, the dither noise is just about audible with each type of dither (providing that the audio equipment and hearing are good enough), but the higher frequencies of the shaped dither seemed less obtrusive. Triangle dither seemed to be a lot more noisy even though the peak amplitude of the noise was substantially lower than the shaped noise. The Rectangle dither noise sounder just a little louder than the triangle dither.

The attached file has 2 second sample of each setting (shaped, then triangle, then rectangle, then none) but has been amplified by 50dB to make it easier to hear. (332 KB)

Interesting Steve.

Does this test mean that you think that Shaped is preferable to triangular. I have my dithering for High Quality Conversion set to “High quality sinc conversion” and “Triangle” at present (My Real-time conversion is left set at the default of “Fast sinc interpolation” and Dither “None”)

IIRC I set it that way a while back following something I read on either on the Wiki or possibly on the forum which led me to think that triangular would be best for me. I record and edit at 44.1kHz 32-bit floating and downsample on export to 44.1kHz 16-bit PCM WAV - WAVs used to create CDs and to load into iTunes for conversion to AAC.

Any further thoughts on best practice settings … ?


To be honest, the differences are very subtle. The main difference is that dither is better than no dither.

To hear just how subtle the effects are, try amplifying the sample that I posted by -50dB to take it back down to normal level.

The example that I gave does not paint the whole picture, but I think shows quite well some of the main features of dither and noise shaping. In the example, the original tone was at -80dB, but if you start with a tone below -100 dB then using bit reduction with dither you will still hear a faint tone, with noise, whereas without dither the sound will disappear completely (silence). At around -96 dB, 16 bit audio runs out of bits, so very faint sounds that are around this level will cut in and out with 1 bit resolution.

The idea behind “Shaped” dither is that human hearing is less sensitive in the very high frequency range, so by shifting the dither noise up to the high frequency end, the good effects of dither can be had while keeping the dither noise subjectively quieter.

In real life we are more likely to be listening to music than to sine tones, and if the very quiet sound in the recording is mostly in the low frequency range, then the shaped noise may be more obtrusive (if you can hear it) than a more broadband noise. On the other hand, if the very quite recording contains a lot of high frequencies, then with “shaped” it will gracefully fade away into the extremely quiet background hiss, whereas with triangular the background hiss will probably be a bit more noticeable.

A peculiar thing about the “rectangle” setting is that when used on true “silence” (all samples at zero) there is no dither noise at all (which will make some people happy) though if the original sound is even as low as -150dB the dither noise will start to appear as a rather unpleasant crackling with a peak level of around -90dB. The same test with “triangle” will produce a much more pleasant “hiss” (also peaking at about -90dB) and with “shaped”, a higher frequency hiss.

For casual listening it probably does not matter at all, but now that you have your new/old hi-fi set up I would suggest going for either “shaped” or “triangle” depending on what flavour you prefer your hiss.

“Shaped” will create a higher noise level above 5kHz than “triangle”, but a lower noise level below 5kHz.
“Rectangle” will produce no noise when converting absolute silence, but a very low level crackle for almost silence, and rather similar to “triangle” when the original is just a little louder.