Analog signals are continuous in time and amplitude, and digital signals are discrete in these two dimensions. Converting an analog signal into digital therefore implies two fundamental steps: sampling - the discretization of time - followed by quantization - the discretization of amplitude. A specific example would be the audio CD, which is sampled 44,100 times a second and quantized with 16 bits, rounding every sample to one of the 65,536 (2^16) possible values.
When performed properly, sampling doesn't throw away any information (see the Nyquist Theorem), but quantization always does. This loss of information translates in distortions applied to the original signal.
Fortunately, working with a 16-bit resolution - as most digital audio files do - ensures that the distortion remains inaudible, almost: cranking up the volume really high in the quietest passages of early digital audio recordings, will reveal it, but only if you listen to passages in which the signal becomes almost silent (e.g. reverberation tails). Modern recoding techniques have gotten rid of these artefacts though, by using dithering. Dithering is the process of intentionally adding noise to the signal prior to its quantization. Dithering turns quantization distortion all the way down by randomizing quantization errors.
Because audio played from your browser is digital anyway, let's illustrate the dithering process in an all-digital context: the conversion of a 16-bit digital audio file down to its 8-bit counterpart. With a maximum dynamic range of 46 dB, 8-bit audio files are of very poor quality. There is no reason why someone would use them nowadays, other than when designing a convincing dithering demonstration.
Dithering is mostly used when down-converting from the higher resolution bit-depths - such as 24-bit or 32-bit - down to 16-bit, the actual standard for distributing digital audio files. Dithering is also used during the analog-to-digital conversion and inside A/D converters, although noise inherent in the analog signal often serves as a natural source of dither in these cases.
Let's review our original 16-bit test file: a voice-over that is played back at decreasing levels, from 0 dBFS down to -90 dBFS. By cranking the volume as the signal gets quieter, you will be able to hear the voice all the way down to -90 dBFS, although this requires either a very quiet listening environment, or powerful volume control.
|8-bit - No dither|
By down-converting the 16-bit file into 8-bit, every sample now gets truncated to one of 256 possible values (the original had 65,536 possible values). Severe quantization distortion occurs. The loss of clarity below -36 dBFS and the absence of any signal below -48 dBFS are the typical limitations of 8-bit audio files.
Although the quantization artifacts are often described as noise (quantization noise), the perfectly preserved silences in the 8-bit signal serve as proof that quantization doesn't add noise, but distorts the original signal.
Quantization rounds up "nuances" in the dynamics of the original signal toward the nearest value available in the lower resolution. Let's work with an analogy and convert decimal numbers (the high resolution) into integers (the lower resolution). The loss in precision is obvious, and the error that is made only depends on the initial number: 4.85 will always be rounded to 5, and the error will always equal 0.15. Now, imagine what would happen, if every time you encounter 4.85, you were able to toggle the output number between 4 and 5, giving 5 85% of chances to be the outcome. Over the long run, the average will equal 4.85. Bingo! This is how dithering works.
Adding noise prior to quantization is a convenient way of toggling bits in a statistically relevant way, letting our ears reconstruct the missing information by averaging consecutive samples.
|8-bit - Dithered|
Now listen to the 8-bit dithered version. The dithering noise is clearly audible. Remarkably, instead of masking the useful signal, it acts as an "enhancer," preserving the speech and its intelligibility down to -54 dBFS: that's an 18 dB improvement over the previous case and 12 dB better than the dynamic range supposedly offered by an 8-bit audio file!
As the speech level approaches zero, the addition of dithering noise keeps toggling the 8-bit output between zero (silence) and one (the value of the least-significant bit), with a probability of getting a one being higher as there is still some signal left in the original signal. Without dithering, the output would have simply been clamped to digital zeros.
For dither to work, the level of the dither noise needs to be of the same order of magnitude as the final quantization step, otherwise the added noise will mask the useful signal instead of revealing it.
|8-bit - Noise-Shaped|
In the case of 8-bit audio files, dithering noise remains quite audible. An improvement consists of using a noise that feels perceptually quieter. Shifting the dither noise toward the upper end of the audible spectrum - where our hearing is less sensitive - not only helps mask it, but keeps it out of the signal frequencies too. As you now listen to the noise shaped conversion, you will realize that speech remains intelligible down to -66 dBFS! That's 18 dB below the theoretical limit of an 8-bit file.
From our examples above, some listeners may prefer quantization distortion over a noisy output. Remember, we chose 8-bit files for that very purpose: to illustrate in an audible way how dithering works. In practice, dithering noise shouldn't be audible.
When working with 16-bit dithered files, dither noise will be 48 dB quieter than the examples above, and will increase the dynamic range of a 16-bit file down to -112 dBFS. In these conditions, the tradeoff is clearly in favor of dithering.
Is AudioCheck free? Not for me. Your support keeps this site running and growing without ads. Every donation gets rewarded with an access to • uncompressed .wav files downloads, for every test • sample rates up to 192 kHz, in the tone generator section • a suggestion box, on every page • no ads, never.
If you already are a patron, please log in.