In this lesson
Sampling is taking photos of air
Digital audio is not a staircase. The sample rate sets the highest frequency a file can hold, and the converter plays one smooth wave through the samples.
Updated · 7 min read · Lesson 1 of 14 in Audio Science
In short
- A sample rate sets the highest frequency a file can hold, half the rate. It does not make the audible range smoother.
- The converter plays one smooth wave through the samples. The staircase is only a drawing, and its steps are filtered away.
- Use 48 kHz by default, 96 kHz for sounds you will slow down a long way, and check masters with a true-peak meter.
In this lesson (8)
The staircase in the textbook
Many audio textbooks show the same drawing: a smooth analog wave next to a blocky digital copy that looks like a staircase. It suggests that digital audio is jagged and that something is missing between the samples, so the obvious fix seems to be more samples per second.
The drawing is wrong about what you hear. A converter measures air pressure at regular instants, like a camera taking photos of moving air. On playback it does not hold each value as a flat step. It draws a smooth curve through the points, and if the photos were taken fast enough for the frequencies in the sound, that curve is the original wave.
Why it matters
Choosing a sample rate for the wrong reason
If you believe in the staircase, 192 kHz looks like a smoother picture. It is not. The sets how high a frequency the file can hold, nothing more. Every common rate already covers the full range of hearing, and each doubling of the rate doubles the disk space and the work every plugin has to do.
Higher rates do have real uses, and they all involve content above 20 kHz. Record at 96 kHz with a microphone that reaches past 20 kHz and you capture ultrasonic detail. Slow that recording down by an octave and the detail between 20 and 40 kHz drops into the range you can hear. A 48 kHz recording has nothing above 24 kHz, so after the same octave drop its top end stops at 12 kHz and it sounds dull. A higher internal rate also gives distortion plugins room to create without , which is what does.
The science
The sampling theorem
The Nyquist-Shannon sampling theorem says a signal can be rebuilt exactly from its samples if it contains no frequency at or above half the sample rate (Shannon, 1949):
Here is the sample rate and the highest frequency in the signal. Half the sample rate is the : 22.05 kHz at 44.1 kHz, 24 kHz at 48 kHz. Hearing tops out around 20 kHz, so 40 kHz would be the bare minimum. The margin above that is for the anti-aliasing filter. The converter must remove everything above the Nyquist frequency before it samples, and a filter needs a band in which to roll off. At 44.1 kHz that band is the narrow stretch from 20 to 22.05 kHz. Anything above the limit that gets past the filter does not vanish. It is stored as a false, lower frequency.
Listen
Hear a frequency fold back down
A tone sweeps up from 500 Hz to 15 kHz. At a 16 kHz sample rate everything above 8 kHz is stored as a falling ghost tone, the same fold a saturator causes when its harmonics pass the Nyquist limit.
Start with your speakers or headphones low.
On the way out, the converter turns the numbers back into a voltage. Its first stage may hold each value for a moment, which really is a staircase, but the steps themselves are energy above the Nyquist frequency. The reconstruction filter removes that energy, and what remains is the one smooth wave, with nothing above the Nyquist frequency, that passes through every sample. Its accuracy is set by the filters and the , not by anything missing between the samples.
The smooth curve also explains . The of the wave can fall between two samples and be higher than either of them. Take a sine at a quarter of the sample rate, sampled 45 degrees away from its peaks: every sample sits at 71% of the true peak. If those samples just touch 0 , the wave itself peaks at +3 dB. A sample-peak meter misses it. A true-peak meter, which oversamples to estimate the wave between samples, catches it.
Try it
See the samples, then slow them down
0 of 7 steps done
The jagged 12 kHz wave sounds like a pure tone and the analyzer shows one line, because the converter plays a sine whatever the display draws. After the octave drop the 48 kHz noise sounds dull, while the 96 kHz noise keeps its top end: it had content up to 48 kHz to move down.
Common mistake
Running every session at 192 kHz
Because a higher rate seems to raise quality across the board, you record and mix everything at 96 or 192 kHz. For ordinary recording it adds no audible detail below 20 kHz. It does cost you: the computer processes two or four times as many samples, files grow, and ultrasonic content can cause in playback gear that was not built to reproduce it. Converting a finished 48 kHz file up to 96 kHz does not help either, because upsampling cannot create content the original never captured.
The second mistake is trusting a sample-peak meter on the master. A master whose samples stop at 0 dBFS can still clip in a playback converter or a lossy encoder because of inter-sample peaks. Check the master with a true-peak meter and leave below 0 dBTP. A common target is -1 dBTP.
Takeaway
Pick the rate for the job
Use 48 kHz as your default. It covers hearing with margin, it is the standard for video, and it keeps CPU and disk use reasonable. Move to 96 kHz when you record sounds you plan to slow down or pitch down a long way, or when a session leans hard on distortion plugins that cannot oversample. Whatever the rate, finish with a true-peak check before you export.
Sample rate
How many times per second a digital system measures the waveform. 48 kHz means 48,000 measurements a second.
Harmonics
Frequencies above a note's fundamental. In pitched sounds they sit at whole-number multiples of it, and their balance is a large part of timbre.
Aliasing
A frequency above the Nyquist limit being stored as a false, lower frequency that was never in the source. Once it is recorded, it cannot be filtered back out.
Oversampling
Running a process at a multiple of the session sample rate, then filtering and converting back. It gives distortion and clipping room to create high harmonics without folding them back as aliasing.
Nyquist frequency
Half the sample rate. It is the highest frequency that sample rate can store correctly.
Bit depth
How many bits store each sample. Each bit adds about 6 dB between full scale and the quantization noise floor: about 96 dB at 16-bit, about 144 dB at 24-bit.
Inter-sample peak
A peak in the reconstructed waveform that falls between two samples, so the highest sample value under-reads it. True-peak meters find it by oversampling.
True peak
The highest level a waveform reaches between samples once it is converted to analog or decoded from a lossy file. It can sit above the highest sample value, so meters estimate it by oversampling.
dBFS
Decibels relative to full scale, the largest value a fixed-point file or converter can hold, so levels below it are negative numbers. Inside a floating-point mix a signal can read above 0 dBFS and stay intact; it clips where it leaves float or passes through a plugin that clips. dBTP is the same scale measured as true peak, and it can read above 0.
Intermodulation
Distortion that creates new frequencies at sums and differences of the tones going in, such as 1160 and 840 Hz from 1 kHz plus 80 Hz. Unlike harmonics, they are not related to the notes.
Headroom
The space between the loudest peak in a signal and the level where it would clip.
3 questions
Check yourself
Sources
Show all 2Hide sources
- Shannon, C. E. (1949). Communication in the presence of noise. Proceedings of the IRE, 37(1), 10-21.
- MIT OpenCourseWare. 6.003 Signals and Systems, Fall 2011. ocw.mit.edu/courses/6-003-signals-and-systems-fall-2011/
Next lesson · 2 of 14
Bit depth sets the noise floorMore bits do not make audio warmer or more detailed. Each one lowers the noise floor by about 6 dB, and dither turns rounding error on quiet sounds into steady hiss.
Written by Virzy Guns
Songwriter and producer, founder of Virzy Guns Production. Now building HealingWave.