home/ atoms/ wavetable-aliasing-high-frequencies

A fixed wavetable aliases at high pitches when its harmonics exceed the Nyquist frequency

A wavetable oscillator reads a stored single-cycle waveform at a rate proportional to the desired pitch. The stored waveform contains all its harmonics up to the Nyquist limit (half the sample rate) at the pitch for which it was built. Raising the playback pitch scales every harmonic’s frequency together, so the top harmonics get pushed past Nyquist. Instead of vanishing, those harmonics fold (mirror) back down into the audible range at new, inharmonic frequencies — this is aliasing, heard as noise or ringing smeared onto the intended tone. Because the sample rate does not change, the problem worsens with every octave of pitch rise: more and more harmonics exceed Nyquist, and gliding the pitch upward floods the audible range with downward-folding partials. A single fixed table therefore cannot be played cleanly across more than roughly half an octave. Fixes keep the system sample rate unchanged: mip-mapping / band-limited tables (multiple tables, one per octave, each holding only harmonics that fit below Nyquist) or algorithmic anti-aliasing oscillators.

Examples

A 40 Hz sawtooth table with 551 harmonics has its top harmonic at ~22,040 Hz, just under the 22,050 Hz Nyquist at 44.1 kHz. Shifted up an octave to 80 Hz every harmonic doubles: the top one lands near 44,080 Hz and folds back to about 20 Hz, with the top two hundred harmonics aliasing below 16 kHz. Likewise a wavetable sawtooth clean at 440 Hz rings audibly at 880 Hz and is completely distorted two octaves up.

Assessment

For a 44.1 kHz sample rate, a sawtooth table has 300 harmonics calibrated for 50 Hz: above what fundamental does the highest harmonic begin to alias, and what does it sound like? A wavetable sawtooth sounds fine at C3 but rings badly at C5 — diagnose it in terms of Nyquist and harmonics, and propose a fix that does not raise the system sample rate.

“alias back down to 20 Hz. And the top two hundred harmonics would be below 16 kHz”
corpus · a-wavetable-oscillator-part-2-anti-aliasing-and-mip-mapping · chunk 1
“We've just discovered the main drawback of wavetable synthesis: aliasing at high frequencies. If we went even higher with the pitch, we would obtain a completely distorted signal.”
corpus · wavetable-synthesis-algorithm-explained-wolfsound · chunk 5