Wavetable lookup needs interpolation because the fractional read index rarely lands on a stored sample
A wavetable oscillator advances a phase accumulator each audio sample by a step proportional to target frequency over sample rate. The resulting index almost always falls between two integer table entries, so a lookup strategy is needed. Truncation (floor) is cheapest but injects high-frequency noise; rounding is slightly better but still aliasy; linear (first-order) interpolation blends the samples at floor(k) and floor(k)+1, weighted by the fractional part, removing most of the pitch-dependent quantization noise. Higher-order interpolation (e.g. cubic) exists and is more accurate but adds cost rarely justified for wavetable synthesis. Linear interpolation is the standard choice: one multiply and one add per lookup for a large reduction in noise. Without it, pitches whose phase step has a large fractional component produce audible artifacts and pitch drift, because the accumulated fractional error is discarded each sample.
Examples
512-sample sine table at 44100 Hz: phase step for 440 Hz = 440/44100 * 512 ≈ 5.11 samples per output sample; dropping the .11 each sample causes pitch drift. Linear form: output = table[i] + frac * (table[i+1] - table[i]). For index k = 17.3: truncation and rounding both return table[17], while linear returns 0.7table[17] + 0.3table[18].
Assessment
Given a 512-sample table at 44100 Hz and a target of 220 Hz, compute the phase step, then explain the artifact without interpolation and how linear interpolation removes it. Write pseudocode for a linear-interpolation lookup given a floating-point index k and table length L, correctly handling the wrap-around case floor(k)+1 == L.