Jump to content
  • 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).

     

    fig1-1491c56a.png.d65836844cc4ab7c4eda01baea8915d5.png

     

    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.

     

    fig2-5d875b55.png.5d28a0b04ff6b6c4b4716ca6dff89cd4.png

     

    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.

     

    fig3-26409736.png.609432e8c56e647baad20290e95559b8.png

    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.

     

     

    craigguitarvertical-5b5709a8.jpg.c737bd9a9d9714cbcf5d7178d50b0188.jpg

     

      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.

     

     




    User Feedback

    Recommended Comments

    • Members

    I remember the transition from analog to digital some three plus decades ago. In the early days of purchasing CDs, we paid a lot of attention to the old SPARs code which on the early releases was almost always AAD. The first direct-to-digital CD I purchased was Tom Jung's DMP label 1983 release of Flim & the BBs "Tricycle"... I used it to help tune PA systems as the sonics & dynamics were pretty amazing. However, my first true DDD CD was Dire Strait's "Brothers In Arms". And actually, I never thought I'd see vinyl records again… for quite a few years, that was the case. Now I'm seeing an increasing number of artist's new releases coming out with a vinyl option. I guess I can understand the pure ideological argument for a return to AAA... back in the late 70s, I operated the venerable 24 track Studer A80 which was a wonderful machine. However, I'm not sure I understand the reasoning behind what is effectively a DDA… unless it's simply an attempt to reach that demographic who refuse to listen to anything NOT on vinyl. But then, wouldn't those individuals be just as opposed to the inclusion of any digital in the chain? Sorry… my mind wanders. ;) In any case... great article, Dr. Anderton.

    Link to comment
    Share on other sites

    • Members

    From my own experience as a mastering engineer there is a huge difference between 44.1kHz and 48kHz sample rate. It noticeably increases the transparency of the signal - even when simply upsampling a 44.1kHz signal. In the same gist you'll notice that EQs are a lot more precise, especially if you are searching for feedback frequencies and other small frequency ranges.

     

    While it is definitely true that analog transfer reduces a signal's quality, you should keep in mind that destructive audio editing (e.g. normalization in WaveLab) in a digital environment will have the same effect. The reason is simple: when applying effects to your "numbers" a new result will come out and that needs to be fitted in your sampling rate and resolution, causing rounding errors.

     

    Another factor is your CPU: it cannot calculate an infinite amount of decimals, when getting close to zero or one rounding will occur. Unfortunately this rounding is not always correct and will sometimes yield the opposite result. In case of bits this means that rounding a number close to zero (i.e. off) will incorrectly result in one (i.e. on). To those who think this is negligible, take a look at fractal arts (e.g. http://upload.wikimedia.org/wikipedia/commons/2/21/Mandel_zoom_00_mandelbrot_set.jpg) - these are the result of rounding errors as described above.

     

    Greetz,

     

    Tox, NovaSonica.com

     

    Link to comment
    Share on other sites

    • Members

    I would consider myself someone who is pretty picky about my music (some use the term "audiophile), and the quality of sound. For your reference in possibly helping with the issue I'm experiencing, here are the specs of my computer: I have a MacBook Pro Retina, 2.3 GHz Intel Core i7, 16 GB RAM, 1600 MHz, Late 2013. I use Bose Companion speakers, plugged into the "headphone jack" audio out. I also use Fidelia to play my FLAC files (I prefer FLAC because of the quality I seem to have with Lossless files) as well as Pure Music w/ iTunes for other downloads. I've tried both Bandcamp and HD Tracks for downloads regarding high resolution music. I've found that I get a better quality with Bandcamp than HD Tracks, comparing the same Sample Rate and File Size, etc. My first question is why am I getting a better sound from Bandcamp file downloads compared to HD Tracks. Additionally, my audio seems to be affected by our AC (Central Air Unit) somehow. I cannot figure this out. I get a low vibrating sound within the audio, and its not just through my Mac, but the TV as well (which is not connected at all to my Mac). I don't think its a grounding issue because as soon as I stop the music or TV (mute) the vibration sound stops although I haven't turned the speakers off. I've heard of phasing issues but I don't understand the concept very well. The computer, TV and speakers are all plugged into adjoining walls with the AC Unit that sits in the backyard corner of the house. I just have this "gut feeling" its connected somehow but no one seems to be able to help. I just finished reading your article and thought, "maybe this is someone who can give me some sort of guidance." In any case, I'd love advice or pointed in the right direction. Thank you so much!

    Link to comment
    Share on other sites


×
×
  • Create New...