Audio & DSP
Sampling: why 44.1 kHz is enough
Nyquist is not a rule of thumb — it is an exact statement about what can and cannot be reconstructed.
Audio starts with one counter-intuitive claim: an ideally band-limited signal can be reconstructed perfectly from discrete samples when its highest frequency is strictly below half the sample rate and ideal reconstruction is used. That half is the Nyquist frequency.
sampleRate = 44100 Hz
nyquist = 44100 / 2 = 22050 Hz <- unfiltered content above this folds into aliases
# Why 44100 specifically? It is not arbitrary:
# human hearing tops out near 20 kHz
# 22050 leaves a safety margin for the anti-alias filter's roll-off
# and 44100 = 25 * 1764 fits nicely into video tape formats of the era
# CD audio: 44100 Hz * 16 bit * 2 channels = 1411200 bit/s = 1.411 Mbit/sThe strict band-limit is the important part. Break it and you do not get a slightly wrong signal — you get a different sampled signal. A 25 kHz tone sampled at 44.1 kHz produces a 19.1 kHz alias (`44100 − 25000`); whether that very high tone is audible depends on the listener and playback equipment.
The distinguishing feature of aliasing versus ordinary noise: it is signal-dependent and deterministic. Feed the same tone, get the same wrong pitch every time. That is why it is so damaging — it is stable, so it sounds like a real instrument playing a wrong note.
# Hear it for yourself — 3 lines
import numpy as np, soundfile as sf
sr = 44100
t = np.arange(sr) / sr # 1 second
# A 25 kHz tone: above Nyquist, must not exist at this rate
x = np.sin(2 * np.pi * 25000 * t)
sf.write('alias.wav', x, sr)
# Play the file: it contains an alias near 19.1 kHz, not silence.
# Whether you can hear it depends on your hearing and playback chain.
# The alias frequency is |44100 - 25000| = 19100 Hz.What happens to a 25 kHz tone sampled at 44.1 kHz?
Why is aliasing worse than random noise?
Nyquist frequency
Half the sample rate; content above it cannot be reconstructed.
Aliasing
Sampling folds frequencies back at Nyquist zones; between Nyquist and the sample rate, a tone aliases to |sampleRate − f|.
Anti-alias filter
A low-pass placed BEFORE the sampler; cheaper than fixing later.
Review cards
Nyquist frequency
Half the sample rate; content above it cannot be reconstructed.
Aliasing
Sampling folds frequencies back at Nyquist zones; between Nyquist and the sample rate, a tone aliases to |sampleRate − f|.
Anti-alias filter
A low-pass placed BEFORE the sampler; cheaper than fixing later.
Sources for this lesson
Below are the references, editions and original links for further reading and checking.
BookThe Scientist and Engineer's Guide to Digital Signal Processingfree
Steven W. Smith
免费在线全文(640 页)
DSP 最好的起点,直觉优先、几乎不用微积分。卷积、递归、傅里叶、数字滤波器都从这里开始。
BookJulius O. Smith III — four online books (DFT / Filters / Physical Audio / Spectral Audio)free
Julius O. Smith III, CCRMA, Stanford
持续更新
音频 DSP 里最超值的一批资源,全免费,含 Matlab / Octave / Faust 代码。
Lights up these nodes in the hub:a-01