How Sound Sampling Works

updated May 16, 1996

An excerpt from the

(To go to the New Complete Mac Handbook page, click the above image.)

How Sound Sampling Works
Sampling rates and resolution
Tips for better recordings
Adjusting levels in SoundEdit 16 and Peak
Adjusting levels in multitrack programs
Tips for positioning a microphone
Adjusting levels in QuickTime recording programs
Choosing a sampling rate

How Sound Sampling Works

To understand how the Mac records and plays back sound, think of a movie. By taking 24 photographs per second, a movie camera captures a reasonably accurate sampling of the action in front of it. When those samples are played back, the illusion of smooth motion is created.

Digital audio also samples motion, like the moving air molecules that make up sounds. Vibrating objects -- whether strings, saxophone reeds, vocal chords, or slamming car doors -- produce sound waves, variations in air pressure that travel outward from the sound source like the ripples from a stone dropped into a pond.

A digital audio recorder samples these sound waves thousands of times per second. Each sample is a digital image of the sound at a given instant (see Figure 21-7 "Snapshots of Sound"). The samples, each recorded as a series of bits, are stored in memory and can be manipulated. Bits can be added or removed, their order can be altered, or their very values changed. Each modification alters the overall image of the sound wave, so when the samples are played back, you hear a different sound.


Figure 21-7: Snapshots of Sound
Sound-editing programs graphically display sampled sounds and let you edit them. At top, 10 milliseconds of a sampled sound have been selected in Passport Design's Alchemy. At bottom, Digidesign's Sound Designer II depicts how a sound changes over time using a sound-analyzing technique called a fast Fourier transformation, or FFT.

Sampling rates and resolution

With movies, taking too few pictures per second results in jittery, unrealistic motion. With sound, taking too few samples per second results in a distorted recording that doesn't faithfully convey all the frequencies present in the original sound. The faster the sampling rate, the more accurate the recording, and the better the recorder is able to capture the highest frequencies.

Compact discs are recorded at a rate of 44,100 samples per second, or 44.1KHz. Without specialized sampling hardware, most Macs' maximum sampling rate is 22KHz -- too slow for recording-studio quality, but fast enough to enable the Mac to sound at least as good as an ordinary table radio.

Another factor that influences digital sound quality is the sampling resolution -- the number of bits assigned to each sample. These bits store information about the sample's amplitude, or loudness. The more bits assigned to each sample, the more accurately the recorder can store and recreate the original sound's variations in loudness.

A compact disc player (and an AV or Power Mac) has a 16-bit sampling resolution, enabling it to reproduce thousands of distinct volume levels. Non-AV and non-Power Macs Macs have 8-bit sampling resolution; they re-create only 256 volume levels. When a given sample's amplitude lies between two levels, it's rounded to the nearest one. This rounding of amplitude information, called quantization, causes distortion.

Tips for better recordings

Setting record levels properly is a vital step. To avoid a noisy recording, adjust your program's levels so that the sound signal registers as high as possible on the program's volume meters without illuminating the very top meter segment. If the top segment illuminates, the recording will be distorted, or, in digital audio parlance, clipped. (see Figure 21-11 "Setting Levels"). If the level is too low, the sound isn't loud enough and background noise and any digital distortion is proportionally louder.


Figure 21-11: Setting Levels
The sound in the top window was recorded at too high a volume setting: Note how the waveform seems to crash into the upper and lower edges of the display. The sound in the middle window is too quiet: Notice that the loudest portions of the waveform aren't that much louder than the background noise. The sound in the bottom window was properly recorded: The waveform peaks almost reach the top and bottom of the display.

Adjusting levels in SoundEdit 16 and Peak

To adjust levels in Macromedia's SoundEdit 16 version 2, use the Levels window.

SoundEdit 16 version 1 doesn't provide a record-level adjustment, nor does Bias Inc.'s Peak. If you're using these programs, you must adjust levels at the source. Plug the microphone into a mixer that has volume-adjustment controls and then attach the mixer to the Mac's sound-input jack.

Adjusting levels in multitrack programs

If you're using a multitrack recording program such as Macromedia's Deck II or Digidesign's Session, adjust the levels using the program's on-screen mixer, as described later in this chapter. (This material is not included in this Heidsite excerpt.)

If you're using a Power Mac and Deck II, you should also use the Audio Input Level menu (in the Options menu) to specify a level of 0. Power Macs contain a low-quality audio preamplifier that can introduce noise; setting this level to 0 turns off the preamplifier. (This step isn't necessary with 680X0 AV Macs, which, incidentally, some people regard as having slightly better-sounding audio than the first-generation Power Macs -- the 6100, 7100, and 8100. Also, some audio gurus maintain that first-generation Power Mac audio quality improves as you climb the family tree -- that costlier models sound better than cheaper ones -- due to the location of the audio circuitry on the logic boards.)

Tips for positioning a microphone

If you're recording a narration, locate the microphone at least a few inches from the narrator's mouth to avoid breathy results. As a test, record the phrase "pretty poppies." If the result sounds like a hurricane, back off.

Also, move as far away from the Mac as possible to avoid recording hard disk and fan noise. If you're still picking up Mac noise, consider turning the Mac off and using a high-quality audio tape recorder or camcorder to make the recording. Then connect the recorder's line-output jacks to your Mac and digitize the results.

Adjusting levels in QuickTime recording programs

If you're doing your audio recording with Adobe Premiere's Audio Capture command, adjust volume levels with the Sound Settings command. And if you're recording audio while also recording video -- using Premiere's Movie Capture command, for example, or the Fusion Recorder application that comes with AV Macs -- use Gain slider in the standard QuickTime Sound Settings dialog box.

Choosing a sampling rate

If you can spare the hard disk space, always record sound using 44KHz, 16-bit settings. Even if you're recording sound destined for a CD-ROM, you'll get better sound quality by recording at 44/16 and then downsampling the audio to 22KHz/8-bit. Alas, downsampling adversly impacts sound quality. Quiet portions of a recording -- the pauses between sentences, for example -- develop static-like artifacts. This is one reason it's important to record at as high a level as you can. You can also make these artifacts less apparent by combining narration with a music soundtrack.

Deck II, SoundEdit 16, and Opcode's DigiTrax can downsample. Deck II does the best job of it; its Mix to Disk command lets you choose from a variety of downsampling options. (For best results, use either the Rounding or Dithering options -- each massages the audio in ways that minimize the distortion inherent in 8-bit audio.) Adobe Premiere 4.0.1 and 4.2 also have an effective downsampling filter. To apply it, select an audio track in the Construction window, choose Filters from the Clip window, and double-click the Downsample filter.


Home | Back to Audio Info | General Mac Info | Digital Video
HotMedia | About Heidsite