home/ atoms/ band-limited-oscillators

Band-limited oscillators generate only the harmonics that stay below Nyquist to avoid aliasing

Mathematically perfect sawtooth, square, and triangle waves contain infinitely many harmonics. In a digital system, any component above half the sampling rate (the Nyquist frequency) cannot be represented and instead folds back (aliases) as inharmonic distortion. A band-limited oscillator solves this by generating, on the fly, only the harmonics below Nyquist for the current fundamental and sampling rate — the resulting waveform is spectrally truncated but alias-free. The count of harmonics is dynamic, not fixed to a wavetable: at a low pitch many harmonics fit under Nyquist, at a high pitch few do, so the highest included harmonic is kept just under the limit. As pitch rises past Nyquist boundaries, upper harmonics smoothly drop out rather than aliasing. Naive oscillators (e.g. a raw phasor~) instead let harmonics cross Nyquist and fold, producing audible artifacts.

Examples

A 440 Hz sawtooth at 44.1 kHz can hold 50 partials under 22.05 kHz; a 5000 Hz sawtooth only 4 before aliasing. In Max/MSP, saw, rect, and tri~ are band-limited equivalents of phasor~-based waves: phasor~ at 10 kHz (sr 48 kHz) puts its 3rd partial at 30 kHz, which folds to 18 kHz, while saw~ at 10 kHz simply omits harmonics above ~24 kHz.

Assessment

Explain why a 10 kHz square wave through a naive (non-band-limited) algorithm sounds more distorted than expected, and what the band-limited version does differently. Predict what you hear sweeping phasor~ vs. saw~ through the Nyquist frequency in Max.

“band-limited oscillators are often used in digital music. Such oscillators, which produce the classic waveforms, are built so that their component frequencies never rise above half of the sampling rate.”
corpus · electronic-music-and-sound-design-vol-1-cipriani-and-giri-of · chunk 23
“in MSP there is a group of bandlimited oscillators (which we have already seen in section 2.1 of the practice chapter), which generate”
corpus · electronic-music-and-sound-design-vol-2-max-8-cipriani-and-g · chunk 12