Aliasing Test — Nyquist Foldover
Hear Nyquist foldover and difference tones with forensic test signals plus spectrum views. Learn exactly what aliasing sounds like. Free in your browser.
Protect your hearing. Start at a low volume. Never raise the volume to make a tone audible. Levels are shown in dBFS, relative to full scale — not SPL.
How it works
Audio DSP synthesizes decimation, foldover frequencies, and difference tones 100% locally in your browser. No audio is ever uploaded or recorded.
Audio sampling requires discrete measurements over time. According to the foundational Nyquist-Shannon sampling theorem, accurate digital capture and reconstruction requires the sampling frequency $f_s$ to be strictly greater than twice the highest frequency component present in the signal ($f_{\text{Nyquist}} = f_s / 2$).
When a signal exceeds this boundary without an aggressive steep-slope analog or digital low-pass anti-aliasing filter, the sampling process creates false phantom frequencies that “fold” across the Nyquist barrier back into the audible spectrum.
Understanding Nyquist Foldover
Unlike harmonic distortion—which creates integer multiples ($2f, 3f, 4f$) that sound musically related to the fundamental—aliased foldover frequencies are mathematically non-harmonic:
$$f_{\text{folded}} = \left| f - f_s \cdot \operatorname{round}\left(\frac{f}{f_s}\right) \right|$$
For example, when operating at a simulated sample rate of $16\text{ kHz}$ ($f_{\text{Nyquist}} = 8\text{ kHz}$):
- A $7\text{ kHz}$ tone passes cleanly ($7\text{ kHz}$).
- A $9\text{ kHz}$ tone folds over to $|9 - 16| = 7\text{ kHz}$.
- A $15\text{ kHz}$ tone folds over to $|15 - 16| = 1\text{ kHz}$.
- A continuous sweep from $1\text{ kHz}$ to $22\text{ kHz}$ sounds like a pitch that climbs to $8\text{ kHz}$, reverses direction and slides down to $0\text{ Hz}$, and then climbs back up!
Intermodulation Difference Tones
This tool also allows testing for high-frequency quadratic intermodulation products. When two closely spaced high-frequency sine waves ($f_1$ and $f_2$, e.g., $15\text{ kHz}$ and $16\text{ kHz}$) are reproduced by imperfect speakers, headphones, or analog converters, non-linearities in the physical transducers generate an audible difference tone:
$$f_{\Delta} = |f_2 - f_1| = 16\text{ kHz} - 15\text{ kHz} = 1000\text{ Hz}$$
Even if your ears cannot perceive pure tones above $15\text{ kHz}$, any audible $1\text{ kHz}$ buzz reveals non-linear distortion in your playback chain.
Frequently asked questions
What is audio aliasing?
Aliasing occurs when an audio signal contains frequencies higher than half of the sampling rate (the Nyquist frequency, fs/2). When sampled without an adequate anti-aliasing low-pass filter, these high frequencies reflect or fold over into lower audible frequencies, creating unnatural inharmonic tones and distortion.
What does this test demonstrate?
This test demonstrates two crucial digital and analog phenomena: (1) Nyquist foldover, where a continuous upward sweep reflects backward down into the audible spectrum once it crosses simulated Nyquist limits, and (2) difference tones (quadratic IMD), where two concurrent high frequencies generate an audible beat frequency in non-linear playback systems.
Why does the tone descend as the sweep rises?
By the Nyquist-Shannon sampling theorem, any frequency component above fs/2 cannot be accurately resolved by the discrete sample grid. Instead, it mirrors across the Nyquist boundary according to |f - fs * round(f/fs)|. As the generator frequency rises towards the sampling rate, the folded product falls down towards 0 Hz.
What are difference tones?
When two tones at frequencies f1 and f2 are played together through an amplifier, speaker, or headphone with non-linear distortion, intermodulation produces sum and difference tones. If f1 = 15 kHz and f2 = 16 kHz, you will clearly hear a 1 kHz difference tone if non-linear distortion exists in the signal chain.