home/ atoms/ oscillator-antialiasing-blep

Digital oscillators band-limit sharp waveform discontinuities to prevent aliasing

A naively generated sawtooth or square wave has instantaneous jumps whose harmonics extend above the Nyquist frequency (half the sample rate); those over-Nyquist components fold back into the audible band as inharmonic aliasing that sounds harsh, especially at high pitches where partials crowd Nyquist. The fix is band-limiting: a minBLEP or polyBLEP inserts a pre-computed band-limited step at each discontinuity, cancelling the aliased content. VCV’s DSP guidance states such a jump must be modelled this way, and notes anti-aliasing is required not only for waveform generation but for waveshaping, distortion, saturation, and nonlinear processing generally.

Examples

A naive sawtooth near the top of the keyboard produces audible whistling aliases at frequencies unrelated to the note; the same pitch with a minBLEP sawtooth stays clean because the over-Nyquist harmonics are removed.

Assessment

Explain why a naive digital sawtooth aliases worse at higher pitches, and name the technique used to insert a band-limited step at each waveform discontinuity.

“A DSP algorithm attempting to model a jump found in sawtooth or square waves must include this effect, such as by inserting a minBLEP or polyBLEP signal for each discontinuity”