Sampling and Aliasing
The previous page turned an arrow and called the rate of turning a note. But a speaker is not sent the arrow. It is sent a list: the arrow’s height, measured at a fixed rate — eight thousand times a second in this instrument, 44,100 for a CD — one number per measurement and nothing else. Between two measurements the arrow turns some fraction of a lap, and if it also completes one or more whole laps, nothing in the list records them. Sampling is a fixed rate of measurement, with no information about what happens between the measurements.
- f — turns per second
- 1000 Hz
- fs — samples per second
- 8000
- laps between samples — f / fs
- 1/8
- the fold — whole laps forgotten
- 1/8 of a lap
- what the speaker makes
- 1000 Hz
- the limit — half a lap per sample
- 4000 Hz
- the list — the first eight samples
- 1000 Hz writes 1.000, 0.707, 0.000, −0.707, −1.000, −0.707, 0.000, 0.707
- so do 7000 Hz, 9000 Hz
Less than half a lap passes between samples, so the shortest step from one sample to the next is the step actually taken. The list is faithful: the curve drawn through it is the wave that was written down.
The bright dots are the samples, landing every 0.45 s on screen. The dashed figure is what the samples describe when each step is taken the short way round. The pink wave is the gentlest curve through the list, which is exactly what a speaker’s smoothing makes of it. Hear the list, then the arrow itself; above the limit they differ.
The ear folded the line of frequencies by doubling: and land on the same note. The list folds it differently. and , where is the sampling rate, produce the same numbers, and so do and , because a measurement of height cannot tell one direction of turning from the other. What the list records is
so every frequency is recorded as one no higher than half the sampling rate. That half is the Nyquist limit. Below it the list represents the wave faithfully. Above it the list is still consistent, but with a slower wave.
Half a lap per sample
Set the arrow to half a lap. The list alternates , the fastest oscillation a list at this rate can hold, since an oscillation needs at least one sample on the way up and one on the way down. Past this point each sample lands before the arrow has completed its lap, and the shortest path from one sample to the next runs backward. Nothing in the list marks the crossing; the list simply describes a slower arrow.
This is why a compact disc samples 44,100 times a second: half of that is 22,050, a little above the highest frequency people can hear, so every audible tone falls under the limit and is recorded faithfully. The rate was chosen to put the limit above hearing.
The wagon wheel
Choose a wheel on film. A wheel with eight spokes looks the same after an eighth of a turn, so as far as the picture is concerned it is a point turning eight times as fast, and film samples only twenty-four times a second. At one and a half turns a second the spokes move exactly half a spoke-gap between frames, and the direction is ambiguous. Slightly faster and the nearest spoke in the next frame is behind the one being watched: the wheel appears to turn backward while the coach moves forward. The eye reads the film correctly; the film itself records a wheel turning backward.
Reconstruction
A speaker does not output the list as steps; it draws the smoothest curve through the samples. It is natural to suspect that the fold happens there, in the smoothing, and that a cleverer reconstruction could recover the original wave. It cannot, because the information was lost when the list was made. For a wave under the limit there is exactly one curve containing no frequency above the limit that passes through every sample, and it is the original. For a wave above the limit that same unique curve is the alias. The instrument computes the curve by the Whittaker–Shannon sum directly, and it matches the folded frequency to three decimals. Under the sound control, the list and the arrow itself sound the same until the frequency passes the limit; after that, the list is correct about what was recorded.
Two folds
The ear’s fold turns a frequency into a note. The list’s fold turns a frequency into an alias. Both have the form with different arguments — a logarithm for the ear, a quotient for the list — which is why an octave is a doubling and aliasing is an addition. Both apply to every digital sound at once: the ear hears as again, and the recorder writes as again.
The next two pages do the same for the eye and the screen. The eye also turns a line into a circle, but not by folding: it takes three numbers from a light’s spectrum and discards the rest, and the circle is closed by colors that no single wavelength produces. The next page is about the eye.