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.

Tool controls

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.

On this page

    An aliasing test plays a signal at a deliberately low sample rate so that high frequencies fold back into the audible range as false tones. This page synthesises foldover sweeps, decimated tones and difference tones with the Web Audio API; nothing is uploaded.

    How to use it

    1. Pick a mode. Sweep, Tone or Difference. Sweep is the default: a 1 kHz to 22 kHz glide that is decimated by the chosen sample rate over 6 seconds.
    2. Choose a simulated sample rate. Buttons cover 8 kHz, 11.025 kHz, 16 kHz, 22.05 kHz, 32 kHz and 44.1 kHz; the default 16 kHz gives a Nyquist readout of 8 kHz.
    3. In Tone mode, set one frequency. The slider runs from 1 kHz to 22 kHz in 250 Hz steps, starting at 9 kHz; the readout shows that 9 kHz folds to 7 kHz at 16 kHz.
    4. In Difference mode, set f1 and f2. Two sliders cover 10 kHz to 18 kHz and 10 kHz to 19 kHz in 500 Hz steps; the 15 kHz and 16 kHz defaults give a 1 kHz difference tone.
    5. Watch the foldover chart. The canvas plots input frequency from 0 to 24 kHz against apparent frequency, with Nyquist dashed in red.
    6. Play, then compare rates. Repeat one tone at 16 kHz and 44.1 kHz to hear the fold point move; Sweep and Tone render a buffer, Difference sums oscillators.

    Nyquist-Shannon and the foldover equation

    The sampling theorem says a band-limited signal is reconstructed exactly when the sample rate fs exceeds twice its highest frequency, so the Nyquist limit is fs/2.

    Anything above fs/2 has no unique representation on the sample grid. Sampled without a band-limiting filter, it reappears at f_alias = |f_signal - n * fs|, where n = round(f_signal / fs). At a simulated fs of 16 kHz:

    Input tone Nearest multiple Folded result
    7 kHz 0.44 x fs, rounds to 0 7 kHz, clean
    9 kHz 0.56 x fs, rounds to 1 9 kHz - 16 kHz = 7 kHz
    15 kHz 0.94 x fs, rounds to 1 15 kHz - 16 kHz = 1 kHz
    17 kHz 1.06 x fs, rounds to 1 16 kHz - 17 kHz = 1 kHz
    25 kHz 1.56 x fs, rounds to 2 32 kHz - 25 kHz = 7 kHz

    The mapping is many-to-one: at 16 kHz, 9 kHz and 25 kHz both land on 7 kHz, while 15 kHz and 17 kHz both land on 1 kHz. A swept tone therefore seems to climb to Nyquist, reverse and slide back down. Once folded, the original frequency is gone: no filter downstream can restore it, because the alias is indistinguishable from legitimate content at the same frequency.

    Anti-aliasing filters prevent exactly this: an ADC band-limits the input below fs/2 before sampling, and oversampling lets a gentler analogue stage do the job. On playback, a reconstruction filter removes the images created by the sample-and-hold. Aliasing in a recording is irreversible.

    Sample rate in practice: 44.1, 48 and 96 kHz

    Higher sample rates push the fold point up but do not add audible bandwidth for adult listeners, whose hearing typically stops between 15 and 18 kHz: 22.05 kHz at 44.1 kHz, 24 kHz at 48 kHz, 48 kHz at 96 kHz.

    Rate Nyquist limit 9 kHz tone 15 kHz tone 25 kHz tone
    16 kHz 8 kHz folds to 7 kHz folds to 1 kHz folds to 7 kHz
    44.1 kHz 22.05 kHz passes at 9 kHz passes at 15 kHz folds to 19.1 kHz
    48 kHz 24 kHz passes at 9 kHz passes at 15 kHz folds to 23 kHz
    96 kHz 48 kHz passes at 9 kHz passes at 15 kHz passes at 25 kHz

    A 25 kHz tone folds to 19.1 kHz at 44.1 kHz, still inside the range of young ears; at 48 kHz it folds to 23 kHz and disappears.

    Difference tones: intermodulation, not aliasing

    When two high tones pass through a nonlinear stage, the output contains sum and difference products at mf1 +/- nf2, and the first-order difference tone is |f2 - f1|.

    With the defaults, 15 kHz and 16 kHz generate a 1 kHz product. If you cannot hear either high tone but hear a 1 kHz buzz, distortion is being generated somewhere in the chain: a clipping amplifier, a driver near its excursion limit, a codec out of headroom, or a poor sound card. Compare at different levels, because transducer distortion scales with excursion while the tones scale linearly.

    One caveat: the cochlea is mildly nonlinear and can generate combination tones, the classic Tartini tone, inside a healthy ear, so a difference tone proves nonlinearity somewhere rather than a fault in your equipment.

    Accuracy, limits and troubleshooting

    • The decimation uses a zero-order hold at your output sample rate, so the alias is present in the PCM and survives any playback chain.
    • The simulated rates are not your hardware’s rate; the page demonstrates sampling mathematics rather than measuring your converter. Most adult headphones and speakers also roll off above 15 kHz, so a quiet top octave may be the transducer or your hearing.
    • Difference tones prove nonlinearity somewhere in the chain, never which component caused it; try another device to isolate it.
    • Windows enhancements, macOS spatial audio and Bluetooth codecs can create their own harmonics; disable them for the difference-tone check.
    • Keep high-frequency tones short and quiet; an easy-to-hear 1 kHz difference tone can sit at a fatiguing level.
    • THD Test — measure harmonic distortion that adds ordered overtones rather than inharmonic aliases.
    • IMD Test — probe intermodulation products with standardised twin-tone signals.
    • Spectrum Analyzer — see folded components and difference products as peaks on a live spectrum.

    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.