what is foldback aliasing in audio sampling?

Creato il: 7 novembre 2025

Risposto usando GPT-5 Thinking da Chat01

Domanda

what is foldback aliasing in audio sampling?

Pensiero

Explaining foldback aliasing

Foldback aliasing is a DSP concept where frequencies above the Nyquist limit reflect back into the baseband due to spectral periodicity. This often occurs in synthesis, like with non-bandlimited waveforms such as sawtooth or square waves. To avoid it, use techniques like anti-aliasing filters or oversampling. The alias frequency is calculated by the formula: falias=k×fs±ff_{\text{alias}} = |k \times f_s \pm f|.

Clarifying foldback aliasing

When a continuous frequency f0f_0 is sampled at fsf_s, the discrete aliasing frequency faf_a is given by fa=f0m×fsf_a = |f_0 - m \times f_s|, where m ensures fafs/2f_a \leq f_s/2. Foldback happens when analog signals above Nyquist reflect to lower frequencies, creating reversed images. For example, a 30kHz sine wave sampled at 44.1kHz folds to 14.1kHz.

Explaining aliasing in synthesis

In aliasing, frequencies above half the sampling rate fold back across multiples of the sampling rate. For example, a 30 kHz tone sampled at 44.1 kHz folds to 14.1 kHz. For a square wave at 1 kHz, any harmonic above 22.05 kHz will fold back. To compute the alias, use:
fa=n×1km×44.1kf_a = |n \times 1k - m \times 44.1k| where mm is chosen so fa22.05kf_a \leq 22.05k.

Clarifying aliasing vs foldback aliasing

Aliasing occurs when frequencies above the Nyquist limit fold into the baseband. Foldback aliasing specifically refers to how these frequencies reflect back downward around the Nyquist point, creating reversed spectral content. To avoid this, use anti-aliasing filters, oversampling, and band

Thought for 27s

Risposta

Foldback aliasing is what happens when frequencies above the Nyquist limit (half the sample rate) get “reflected” back into the audible band during sampling or digital synthesis. As you push a real frequency past Nyquist, its aliased version in the sampled signal moves the opposite direction—folding back—so high components reappear as wrong, inharmonic tones.

Rule of thumb (mapping):
For a real frequency ff sampled at rate fsf_s, the aliased frequency is

falias=fmfswith integer m chosen so faliasfs2.f_{\text{alias}}=\left|\,f - m f_s\,\right|\quad\text{with integer }m\text{ chosen so }f_{\text{alias}}\le \tfrac{f_s}{2}.

Equivalently: mirror around multiples of fs/2f_s/2.

Quick examples ( fs=44.1 kHzf_s=44.1\text{ kHz}, Nyquist =22.05 kHz=22.05\text{ kHz} ):

  • 30 kHz → 3044.1=14.1|30 - 44.1| = 14.1 kHz (folds down)
  • 24 kHz → 2444.1=20.1|24 - 44.1| = 20.1 kHz
  • In a 1 kHz square wave, any harmonic above 22.05 kHz (e.g., 25 kHz) folds back (25 → 19.1 kHz), creating the “zingy,” inharmonic alias sound.

Where you’ll notice it

  • Recording without a proper anti-alias (analog) low-pass.
  • Virtual synths using non-band-limited waveforms (saw, square).
  • Nonlinear processing (clipping, waveshaping) or aggressive resampling that generates content above Nyquist.

How to avoid/minimize it

  • Low-pass filter before A/D (cutoff ≤ Nyquist), and after oversampling stages.
  • Oversample during DSP/synthesis, then low-pass and decimate.
  • Use band-limited oscillators/techniques (BLIT, polyBLEP/minBLEP, additive).
  • Keep modulation/distortion settings from pushing lots of energy above Nyquist.

That’s foldback aliasing in a nutshell: anything above half the sample rate doesn’t disappear—it comes back in disguise.

Condividi questa Q&A