ESSENCE/Experiment quantization noise
Contents
Listen to quantization noise
An analog signal is continuous in time and value.
Sampling turns it into a series of measurements which are discrete in time: a pulse train.
Each measurement has limited resolution, depending on the number of bits of the analog-to-digital converter. It is quantized to one discrete value out of 2^N available values, where N is the number of bits the converter has.
The resulting rounding error leads to quantization noise. It creates a noise floor like we know from analog sources like tape or vinyl records, just usually a lot softer. Each bit gives us around 6 dB of signal-to-noise ratio.
In the following experiment, we will hear how quantization noise sounds. The links are sound files in 48 kHz / 16 bits .wav format, but we will gradually compromise their content. This makes it easier to compare, because your system always deals with the same file format, and nothing can go wrong on your system that might disturb the experiment.
Step 1: a perfect 16-bit signal
Here is an anechoic recording (that means it was recorded in a chamber where the walls absorb all reflections) of a monologue from Shakespeare's Henry V. Computers cannot do analog, so we have to start with a very high-quality digital signal, with a sampling rate of 48 kHz and a resolution of 16 bits.
This file's quality is so high that you will not hear any quantization noise: original file
Step 2: a 12-bit signal
Now we will turn the level down by 24 dB. As expected, it is very soft now, but we also effectively lost 24 / 6 = 4 bits of information, and 12 bits remain from the original 16.
Now we will amplify it by 24 dB. It gets as loud as before, but we have lost resolution forever. That means our quantization noise floor is now 6 dB higher. That is very difficult to hear except in a quiet studio.
Step 3: an 8-bit signal
Let's turn the original file down by 48 dB. Now we lose 48 / 6 = 8 bits of information, and we now have only 8 bits left.
As we turn it back up by 48 dB for the original volume, the quantization noise becomes very audible.
8 bit is the resolution of vintage gaming computers from the 80s. It was great for playing games, but not so nice for music. It is also roughly the dynamic range for very simple consumer cassette recorders (if you remember those), without any noise reduction engaged.
Step 4: a 4-bit signal
If you are in a loud environment and could only hear subtle effects until now, let's go one step further:
We turn the original down by 72 dB to lose 72 / 6 = 12 bits, so only four bits are left. That means we now have 24 dB of dynamic range between the loudest signal we can handle and the volume of the noise floor. This is worse than anything you ever had to listen to, so the noise should be very obvious as we turn it back to the original volume.
Notes
Gain structure and fixed vs. floating point
The loss of quality teaches us that even in digital systems, a good gain structure is important, just like in an analog signal chain. However, this is only true for samples in integer format (also known as fixed-point), and indeed, this format was used to create those files. Most modern digital audio workstations use floating-point format, where if you make a signal softer, you "get more bits after the decimal point", so you don't lose resolution.
A 32-bit float sample has 24 bits of actual resolution, but it will always have that resolution over an unlimited range of levels.
But remember: the last step in your digital signal chain, the digital-to-analog converter, is always fixed-bit. So while you can be a bit sloppy with your gain structure in a modern DAW, be sure to deliver a good level to the converter from your master output. Because if you come in at -24 dB and then turn up your amplifier after that, you get 6 dB more noise than you should have.
"Noise" or "distortion"
Actually, the comparison of the noise floor is not fair to analog systems. They sound a lot better at the same noise level, because analog noise is random. Digital quantization noise on the other hand is signal-dependent, and that is why it is more correctly called quantization distortion. And distortion always sounds nastier than just random noise.
There is a way to remove quantization distortion completely. This technique is called dither.
License
The Henry V recording was created by user Acclivity and uploaded to freesound.org under CC-BY-NC 4.0.
The experiment was created by Jörn Nettingsmeier under CC-BY-SA 4.0.