Digital Sound & Music: Concepts, Applications, & Science, Chapter 5, last updated 6/25/2013
complex sound wave). This is a phenomenon called aliasing the incorrect digitization of a
sound frequency component resulting from an insufficient sampling rate.
For a single-frequency sound wave to be correctly digitized, the sampling rate must be at
least twice the frequency of the sound wave. More generally, for a sound with multiple
frequency components, the sampling rate must be at least twice the frequency of the highest
frequency component. This is known as the Nyquist theorem.
The Nyquist Theorem
Given a sound with maximum frequency component of f Hz, a sampling rate of at least 2f is
required to avoid aliasing. The minimum acceptable sampling rate (2f in this context) is called
the Nyquist rate.
Given a sampling rate of f, the highest-frequency sound component that can be correctly sampled
is f/2. The highest frequency component that can be correctly sampled is called the Nyquist
In practice, aliasing is generally not a problem. Standard sampling rates in digital audio
recording environments are high enough to capture all frequencies in the human-audible range.
The highest audible frequency is about 20,000 Hz. In fact, most people don’t hear frequencies
this high, as our ability to hear high frequencies diminishes with age. CD quality sampling rate
is 44,100 Hz (44.1 kHz), which is acceptable as it is more than twice the highest audible
component. In other words, with CD quality audio, the highest frequency we care about
capturing (20 kHz for audibility purposes) is less than the Nyquist frequency for that sampling
rate, so this is fine. A sampling rate of 48 kHz is also widely supported, and sampling rates go
up as high as 192 kHz.
Even if a sound contains frequency components that are above the Nyquist frequency, to
avoid aliasing the ADC generally filters them out before digitization.
Section 5.3.1 gives more detail about the mathematics of aliasing and an algorithm for
determining the frequency of the aliased wave in cases where aliasing occurs. Bit Depth and Quantization Error
When samples are taken, the amplitude at that moment in time must be converted to integers in
binary representation. The number of bits used for each sample, called the bit depth, determines
the precision with which you can represent the sample amplitudes. For this discussion, we
assume that you know that basics of binary representation, but let’s review briefly.
Binary representation, the fundamental language of computers, is a base 2 number
system. Each bit in a binary number holds either a 1 or a 0. Eight bits together constitute one
byte. The bit positions in a binary number are numbered from right to left starting at 0, as shown
in Figure 5.6. The rightmost bit is called the least significant bit, and the leftmost is called the
most significant bit. The
bit is called b[i] .
Figure 5.6 An 8-bit binary number converted to decimal
Previous Page Next Page