home/ atoms/ wavetable-harmonic-scaling-per-pitch

A wavetable oscillator must reduce its harmonic count as pitch rises

Because harmonic frequencies scale with the fundamental, the number of harmonics that fit below Nyquist shrinks as pitch rises — so a correct oscillator cannot reuse one full-harmonic waveform across all pitches. The design rule is to scale harmonic content with pitch: keep full harmonic content at the low end and progressively eliminate the harmonics that would exceed the range of hearing and alias back down as pitch climbs. The maximum safe harmonic count at a given fundamental is roughly floor(sample_rate / (2 × fundamental)). This scaling is realized either by switching subtables (mip-mapping) or by recomputing the table, and the choice trades quality against memory and CPU.

Examples

At 44.1 kHz: 40 Hz allows ~551 harmonics, 80 Hz only ~275, 440 Hz (A4) about 50, and 4186 Hz (C8) only ~5. A high fundamental therefore has a much simpler, more sine-like timbre than a low one.

Assessment

At a 48 kHz sample rate and a 200 Hz fundamental, compute the maximum number of harmonics the table can hold without aliasing, and explain what this implies about timbre at high fundamentals.

“allow scaling of harmonic content based on pitch so that we have all the harmonic content we need at the low frequency end, and, as we move up, eliminate those harmonics”
corpus · a-wavetable-oscillator-part-2-anti-aliasing-and-mip-mapping · chunk 1