The promise of perfect audio—the Nyquist Theorem

Most people who've look at digital audio before know about the Nyquist theorem—if you sample an analog signal at a rate of at least twice its highest frequency component, you can convert it back to analog, passing through a low-pass filter, and get back the same thing you put in. Exactly. Perfectly.

sampling image

The real world

In the real world, though, many people argue that analog "sounds better." How can this be, if digital audio is perfect?

For one thing, we've grown to like some of the deficiencies of analog recording. Just as tube amplifiers give a more pleasant distortion and compression to musical signals than transistors, analog tape similarly warms up and fattens the sound.

Of course, this alone isn't a reason to forsake digital's many conveniences. We can always use other means, such as tube compressors, to fatten the sound if needed. The real problems lie with the real-world problems Nyquist didn't warn us about.

First, there is no such thing as the perfect low-pass filter required by Nyquist's theorem. A real filter has a finite slope, so we need to set its cut-off a little lower than theory. Also, a steep filter has a lot of phase shift near and above the cutoff. And some aliasing is bound to leak through at the very high end. A technique called oversampling has been developed to reduce these problems.

Another big problem is finite wordlength effects—we're using 16-bit samples, not the pure numbers of the Nyquist theorem, so we have to compromise the sample values. To start, 16 bits is not as great as it seems. Yes, it translates into 96 dB dynamic range, but that's an absolute ceiling—you can't go any higher. So, the average music level must be much lower in order to allow headroom for peaks. And, at the low amplitude end, distortion of small-signal components is very high, contributing to the "brittle" sound that many people describe with digital audio. On top of this, any gain change (from mixing tracks or changing volumes) causes individual samples to be rounded to the nearest bit level, adding distortion. Fortunately, a technique called dithering relieves these problems.

Clock jitter is another problem. If the sample clock timing is not perfect, it creates another kind of distortion. For a self-contained unit, the solution is simply more accurate timing; reducing timing errors reduces the distortion to a negligible level. When digitally interfacing with other units, though, the issue becomes a little more complex, but is not a problem when handled correctly.

Finally, an often overlooked detail in digital audio discussion is that Nyquist's samples are instantaneous values—impulses. Our digital systems generally output stairsteps to the convertor and low-pass filter, holding the current sample level until the next. This causes a frequency droop and loss of highs—impulses carry more high-frequency energy than stairsteps. The solution is not to produce impulses—which are impossible to produce perfectly—but to simply adjust the frequency response with filtering. Fortunately, it's trivial to add this adjustment to an oversampling filter.

Created Oct 19, 1996

return