Sample a single tone and watch its spectrum in the sandbox, and predict — before you read it off the screen — the exact frequency the tone appears at, and when the anti-alias filter is what saves it.
Aliasing is the one sampling mistake you cannot undo afterwards: once a 12 kHz tone has folded down to 4 kHz, no filter on the samples can tell it apart from a real 4 kHz tone. Seeing exactly where a tone lands — and seeing the anti-alias filter stop the fold before it happens — is the whole reason the sampling theorem matters.
Open the sandbox. The demo opens on exactly this state — a single tone — so a Reset gets you here too. Each step names the one knob to change; leave everything else alone.
Waveform -> Single tone fs -> 16000 Hz
Filter before sampling -> off (turn on only in Step 3)
Watch the Nyquist frequency readout and the marked fold in panel 2 — every number you predict is printed there.
Keep the defaults: f = 1500 Hz, f_s = 16000 Hz, filter off. Since f is well below f_s/2, predict where the tone lands in the sampled spectrum, then read it.
The sampled spectrum shows the tone still at f_alias = 1500 Hz — below the Nyquist frequency f_s/2 = 8000 Hz, so nothing folds.
Drag f up to 12000 Hz, keeping f_s = 16000 Hz. Now f > f_s/2. Predict the frequency the tone appears at after sampling, then read it.
The sampled spectrum shows the tone at f_alias = 4000 Hz — it has folded down below Nyquist. A 12 kHz tone now masquerades as a 4 kHz one, its phase inverted.
Leave f at 12000 Hz and turn on Filter before sampling. The filter must remove everything above the Nyquist frequency before the sampler sees it. Predict that ceiling f_s/2, then read the readout.
The Nyquist-frequency readout is f_s/2 = 8000 Hz. With the anti-alias filter cutting above it, the 12 kHz tone is attenuated before sampling, so the false 4 kHz alias disappears from the spectrum.
Everything above is waiting in the sandbox. Sweep f past f_s/2 and watch the tone fold, change the sampling rate, and toggle the anti-alias filter to see the fold appear and vanish in real time.
- Read a tone staying put at f_alias = 1500 Hz, below Nyquist
- Watched a 12 kHz tone fold down to f_alias = 4000 Hz
- Found the ceiling the anti-alias filter must enforce, f_s/2 = 8000 Hz
- Every frequency you predicted is the demo's own fold arithmetic, not a picture