DIGITAL AUDIO BASICS
By Anderton |
Not quite sure how digital audio works? Here's your refresher course
by Craig Anderton
Digital technology—which brought us home computers, $5 calculators, cars you can't repair yourself, Netflix, and other modern miracles—has fundamentally re-shaped the way we record and listen to music. Yet there's still controversy over whether digital audio represents an improvement over analog audio. Is there some inherent aspect of digital audio that justifies this skepticism?
Let's take a look at the basics of digital sound audio: why it’s different from analog sound, its benefits, and its potential drawbacks. Although digital audio continues to improve, the more you know about it, the more you can optimize your gear to take full advantage of what digital audio can offer.
BASICS OF SOUND
What we call “sound” is actually variations in air pressure (at least that’s the accepted explanation) that interact with our hearing mechanism. The information received by our ears is passed along to the brain, which processes this information. However, while acoustic instruments automatically generate changes in air pressure which we hear as sound, electronic instruments create their sound in the form of voltage variations.
Hearing these voltage variations requires converting them into moving air. A transducer is a device that converts one form of energy into another; for example, a loudspeaker can convert voltage variations into changes in air pressure, while a microphone can change air pressure changes into voltage variations. Other transducers include guitar pickups (which convert mechanical energy to electrical energy), and tape recorder heads (which convert magnetic energy into electrical energy).
If you look at audio on a piece of test equipment, it looks like a squiggly line, which graphically represents sound (Fig. 1).
Fig. 1: An audio waveform.
This could stand for air pressure changes, voltage changes, string motion, or whatever. A straight horizontal line represents a condition of no change (i.e. zero air pressure, zero voltage, etc.), and the squiggly line is referenced to this base line. For example, if the line is showing a speaker cone’s motion, excursions above the base line might indicate that the speaker cone is moving outward, while excursions below the base line might indicate that the speaker cone is moving inward. These excursions could just as easily represent a fluctuating voltage (such as what comes out of a synthesizer) that alternates between positive and negative, or even the air pressure changes that occur if you strike a piano key. The squiggly line is called a “waveform.”
Let’s assume that striking a single piano note produces the waveform shown in Fig. 1. If we take that waveform and press an exact analogy of the waveform into a vinyl record, that record will contain the sound of a piano note. Now, suppose we play that record. As the stylus traces this waveform, the phono cartridge will send out voltage variations which are analogous to the original air pressure changes caused by the piano note. This low-level signal then passes through an amplifier, which augments the voltage enough to drive a speaker cone back and forth. The final result is that the speaker cone follows the waveform motion, thus producing the same air variations originally pressed into the vinyl record. Notice that each stage transfers a signal in its own medium (vinyl, wire, air, etc.) that is analogous to the input signal; hence the term, analog recording.
Unfortunately, analog recording is not without its faults. First of all, if the record has pops, clicks, or other problems, these will be added on to the original sound and show up as undesirable “artifacts” in the output. Second, the cartridge will add its own coloration; if it can’t follow rapid changes due to mechanical inertia, distortion will result. Phono cartridge preamps also require massive equalization (changes in frequency reponse) to accommodate cartridge limitations. Amplifiers add noise and hum, and speakers are subject to all kinds of distortion and other problems.
So, while the signal appearing at the speaker output may be very similar to what was originally recorded, it will not duplicate the original sound due to these types of errors. When you duplicate a master tape or press it into vinyl, other problems will occur due to the flawed nature of the transfer process. In fact, every time you dub an analog sound, or pass it through a transducer, the sound quality deteriorates.
THE CONSISTENCY OF DIGITAL
Digital audio removes some of the variables from the recording and playback process by converting audio into a string of numbers, and then passing these numbers through the audio chain (in a bit, we’ll see exactly why this improves the sound). Fig. 2 illustrates the conversion process from an analog signal into a number.
Fig. 2: The digital conversion process.
Fig. 2a represents a typical waveform which we want to record. A computer takes a “snapshot” of the signal every few microseconds (1/1,000,000th of a second) and notes the analog signal's level, then translates this “snapshot” into a number representing the signal's level. Taking additional samples creates the “digitized” signal shown in Fig. 2b. Note that the original signal has been converted into a series of samples, each of which has its own unique value.
Let’s relate what we’ve discussed so far to a typical audio system. A traditional microphone picks up the audio signal, and sends it to an Analog-to-Digital Converter, or ADC for short. The computer takes this numerical information and optionally processes it—for example, delays it in the case of a digital delay or with a sampling keyboard, stores the information in memory.
So far so good, but listening to a bunch of numbers does not exactly make for a wonderful audio experience. After all, this is an analog world, and our ears hear analog sound, so we need to convert this string of numbers back into an analog signal that can do something useful such as drive a loudspeaker. This is where the Digital-to-Analog Converter (DAC) comes into the picture; it takes each of the numerical samples and re-converts it to a voltage level, as shown in Fig. 2c. A lowpass filter works in conjunction with the DAC to filter the stair-step signal, thus “smoothing” the series of discrete voltages into a continuous waveform (Fig. 2d). We may then take this newly converted analog signal and do all of our familiar analog tricks like putting it through an amplifier/speaker combination.
But what’s the point of going through all these elaborate transformations? And doesn’t it all affect the sound? Let’s examine each question individually.
The main advantage of this approach is that a digitally-encoded signal is not subject to the deterioration an analog signal experiences. Consider the compact disc, the first example of mass-market digital audio; it stores digital information on a disc which is then read by a laser and converted back into analog. By taking this approach, if a scratch appears on the disc it doesn’t really matter—the laser recognizes only numbers, and will tend to ignore extraneous information.
Even more importantly, using digital audio preserves quality as this audio goes through the signal chain. For example, a conventional analog multi-track tape gets mixed down to an analog two-track tape, which introduces some sound degradation due to limits of the two-track machine. It then gets mastered (another chance for error), converted into a metal stamper (where even more errors can occur), and finally gets pressed into a record (and we all know what kinds of problems that can cause, from pops to warpage). At each audio transfer stage, signal quality goes down.
With digital recording, suppose you record a piece of music into a computer-based recording system that stores sounds as numbers. When it’s time to mix down, the numbers—not the actual signal—get mixed down to the final stereo or surround master (of course, the numbers are monitored in analog so you can tell what’s going on). Now, we can transfer that digitally-mixed signal directly to the compact disc; this is an exact duplicate (not just an analogy) of the mix, so there's no deterioration in the transfer process.
Essentially, the Analog-to-Digital Converter at the beginning of the signal chain “freeze dries” the sound, which is not reconstituted until it hits the Digital-to-Analog Converter in the listener’s audio system. This is why digital audio can sound so clean; it hasn’t been subjected to the petty humiliations endured by an analog signal as it works its way from studio to home stereo speaker.
LIMITATIONS OF DIGITAL AUDIO
So is digital audio perfect? Unfortunately,digital audio introduces its own problems which are very different from those associated with analog sound. Let’s consider these one at a time.
Insufficient sampling rate. Consider Fig. 3, which shows two different waveforms being sampled at the same sampling rate.
Fig. 3: Sampling rate applied to two different waveforms.
The original waveforms are the light lines, each sample is taken at the time indicated by the vertical dashed line, and the heavy black line indicates what the waveform looks like after sampling. Fig. 3a is a reasonably good approximation of the waveform, but Fig. 3b just happens to have each sample land on a peak of the waveform, so there is no amplitude difference between samples, and the resulting waveform looks nothing at all like the original. Thus, what comes out of the DAC can, in extreme cases, be transformed into an entirely different waveform from what went into the ADC.
The solution to the above problems is to make sure that enough samples are taken to adequately represent the signal being sampled. According to the Nyquist theorem, the sampling frequency should be at least twice as high as the highest frequency being sampled. There is some controversy as to whether this really is enough, but that’s a controversy we won’t get into here.
Filter coloration. As mentioned earlier, we need a filter after the DAC to convert the stair-step samples into something smooth and continuous. The only problem is that filters can add their own coloration, although over the years digital filtering has become much more sophisticated and transparent.
Quantization. Another sampling problem relates to resolution. Suppose a digital audio system can resolve levels to 10 mv (1/100th of a volt). Therefore, a level of 10 mV would be assigned one number, a level of 20 mV another number, a level of 30 mV yet another number, and so on. Now suppose the computer is trying to sample a 15 mV signal—does it consider this a 10 mV or 20 mV signal? In either case, the sample does not correspond exactly to the original input level, thus producing a quantization error. Interestingly, note that digital audio has a harder time resolving lower levels (where each quantized level represents a large portion of the overall signal level) than higher levels (where each quantized level represents a small portion of the overall signal level). Thus, unlike analog gear where distortion increases at high amplitudes, digital systems tend to exhibit the greatest amount of distortion at lower levels.
Dynamic range errors. A computer cannot resolve an infinite number of quantized levels; therefore, the number of levels it can resolve represents the systen's dynamic range. Computers express numbers in terms of binary digits (also called “bits”), and the greater the number of bits, the greater the number of voltage levels it can quantize. For example, a four-bit system can quantize 16 different levels, an eight-bit system 256 different levels, and a 16-bit system can resolve 65,536 different levels. Clearly, a 16 bit system offers far greater dynamic range and less quantization error than four or eight-bit systems, and 20 or 24 bits is even better.
Incidentally, there’s a simple formula to determine the approximate dynamic range in dB based on the bits used in a digital audio system, where dynamic range = 6 X number of bits. Thus, a 16 bit system offers 96 dB of dynamic range—excellent by any standards. However, this is theoretical spec. In reality, factors like noise, circuit board layouts, and component limitations reduce the maximum potential dynamic range.
THE DIGITAL AUDIO DIFFERENCE
Despite any limitations, when the CD was introduced most consumers voted with their dollars and seemed to feel that despite any limitations, the CD's audio quality sure beat ticks, pops, and noise. Unfortunately, the first generation of CD players didn't always realize the full potential of the medium; the less expensive ones sometimes used 12-bit converters, which didn't do the sound quality any favors. Also, engineers re-mastering audio for the CD had to learn a new skill set, as what worked with tape and vinyl didn't always translate to digital media.
While digital audio may not be perfect, it’s pretty close and besides, the whole field is still relatively young compared to the decades over which analog audio matured. An alternate digital technology, Direct Stream Digital, was introduced several years to a less-than-enthusiastic response from consumers yet many believe it sounds better than standard digital audio based on PCM technology; furthermore, as of this writing the industry is considering transitioning to 24-bit systems with a 96kHz sampling rate. While controversial (many feel any advantage is theoretical, not practical), this does indicate that efforts are being made to further digital audio's evolution.
Craig Anderton is Editor Emeritus of Harmony Central. He has played on, mixed, or produced over 20 major label releases (as well as mastered over a hundred tracks for various musicians), and written over a thousand articles for magazines like Guitar Player, Keyboard, Sound on Sound (UK), and Sound + Recording (Germany). He has also lectured on technology and the arts in 38 states, 10 countries, and three languages.
Recommended Comments