Square One: All in a Dither

What is it about dither that inspires so much trepidation among digital musicians? The mere mention of the word brings looks of disquietude normally reserved for the presence of witch doctors. Many explanations inadvertently contribute to dither's voodoo aura either by being too technical or by making it seem too much like magic. In this article, I'll strive to find the “happy place” where the concept reveals itself as a natural, sensible thing, albeit slightly counterintuitive.

Nontechnical people have no fear of dither. They understand it to be a vibration, fluctuation, or vacillation. This is the essence of dither in the technical sense, too: it vibrates the least significant bit of a digital signal in a way that interferes with the ill effects of quantization error. Simply put, dither counteracts quantization error.

FIG. 1: The blue line represents a sine wave prior to A/D conversion. The red line represents the result of the digitization. The values between quantization intervals are rounded up or down, squaring off the waveform.

Photos: Chuck Dahmer

Recall that quantization error is the distortion caused by rounding either the measurement of a sample during digitizing or the results of a DSP calculation. In both cases, the rounding of very soft signals results in a pronounced squaring off of the waveform. If, as in Fig. 1, the source is a sine wave, the digitized result is very much like a square wave with the same fundamental as the sine wave. (In the most extreme case — that of the quietest yet still detectable sine wave — the result would be a square wave. More often, however, it's a squarish wave, but the principle still applies.)

FIG. 2: The spectrum of the digitized signal from Fig. 1 includes overtones (harmonics) that were not present in the source signal (the sine wave).

The harmonic content of a square wave is, of course, quite distinct from that of a sine wave — a square wave has a distinctive set of overtones, whereas a sine wave has none. The addition of overtones that is caused by quantization error is called harmonic distortion, because it is harmonically related to the input signal (see Fig. 2). This harmonic distortion occurs not just with sine waves, but with all input signals. Our ears are drawn to it precisely because it correlates to the original. It goes without saying that distortion that draws attention to itself is the worst kind.

Here's the counterintuitive part: the solution is to add very quiet noise — dither — to the signal before digitization (or, in the case of internal processing, before rounding the result of the DSP). Go ahead and cringe at the idea, it's okay. The noise is lost in the sonic impact of louder sounds, but it carries a benefit that reveals itself on very soft sounds. It toggles (vibrates/fluctuates/vacillates) the least significant bit randomly, causing its rounding behavior not to track the input signal. Because the rounding does not correlate to the source, there is no harmonic distortion.

FIG. 3: The blue line represents a dithered sine wave prior to A/D conversion. The red line represents the results of the digitization. Its overall trend tracks the sine wave, but it rounds up and down between adjacent quantization intervals randomly. No large square corners result.

COME HITHER, DITHER

Fig. 3 shows the digitization of a dithered sine wave. Because the sine wave is modulated randomly by the noise, the behavior of the digitized wave is less predictable. The overall arc of the digitized wave still reflects the period of the sine wave, but it has not been turned into a virtual square wave. Instead of a consistent set of square corners (representing harmonics), the digitized wave exhibits many smaller corners of random size and distribution. That randomness is the essence of noise.

Spectrum analysis of a digitized dithered sine wave reveals an energy peak at the sine wave's fundamental, along with a small amount of noise (see Fig. 4). The harmonic distortion that occurs when digitizing an undithered sine wave is eliminated. Note that it is not simply masked by the noise — it is eliminated (see Web Clip 1).

Sometimes a technique called noise shaping is used to shift the spectrum of the noise upward toward the Nyquist frequency, where our ears are less sensitive. By doing this, we can have the benefits of dither with less apparent noise.

FIG. 4: The spectrum of the digitized signal from Fig. 3 consists of a single dominant frequency—the frequency of the sine wave—as well as a very small amount of noise. The harmonic distortion has been eliminated and replaced by noise.

WHITHER SHALT THOU DITHER?

Because it counteracts the quantization distortion inherent in rounding, dither is to be used whenever you shorten the word length of a signal. The most drastic shortening of word length occurs when you digitize an analog signal — you could say the analog signal has infinite word length. Dither is therefore built into A/D converters, and it cannot ordinarily be adjusted or defeated. Dither, then, is as automatic as it is critical in the recording phase. It may, however, be a factor that contributes to the characteristic sound of a particular A/D converter.

Word length is also shortened when you bounce a 16-bit file from a 24-bit session. Be sure to apply dither when you bounce to a lower bit depth. (Note that sampling rate and dither have nothing to do with each other.) Typically, you would insert a dither plug-in as the final processor on your session's master fader or output bus. Set the dither to 16 bits, and bounce. Because the signal was dithered on capture, applying dither when bouncing is sometimes called redithering.

There is some debate as to whether you should dither a 24-bit bounce. Although it is technically the correct thing to do, the noise specs on all modern converters are well above the level at which the lack of dither would become apparent. Go ahead and dither, though — you've got nothing to lose.

More often than not, signal processing generates results that are longer than the nominal word length and must be truncated or rounded. If that sounds like a job for dither, you've got it. The design of a DAW usually determines whether dither is applied after real-time effects, but the user generally has control over whether to redither file-based processes. You should not redither repeatedly, however, because the noise can accumulate.

DITHER, HITHER AND THITHER

Although any dither is better than none, some dither is better than others. Several premium brands of dither are available, distinguishing themselves by the quality of the resulting low-level details and by the degree to which the noise remains innocuous. One highly regarded dither that has become widely available by being bundled with popular DAWs is POW-r dither, a product created by a consortium of respected audio companies. If you have multiple dithers at your disposal, create some careful listening tests with very quiet signals and signals that die away to black. These are the points at which dither reveals itself (see Web Clip 2). Some dithers, including POW-r, offer multiple types, and some offer defeatable noise shaping. For complex psychoacoustic reasons, different source materials may benefit from different dithers, types, and noise-shaping options. Experiment, listen critically, and keep an open mind.

Proper use of dither results in improved low-level detail, reduced harshness, and more-natural fade-outs. If it still feels like voodoo, embrace it anyway. Vacillate no more — go thither and dither.

Brian Smithers is department chair of workstations at Full Sail University in Winter Park, Florida.