home/ atoms/ perfect-quantization-free-sine-waves

Only three frequencies — sr/3, sr/4, sr/6 — produce sine waves with zero quantization error at any amplitude

Most sine waves require values that fall between quantization levels, introducing quantization error. A perfect quantization-free sine is only possible when every sample value falls exactly on a quantization step. This requires the frequency to be a simple integer fraction of the sample rate, and the phase to be aligned so that the sine only produces values from the set {0, +A, -A}. Analysis shows only three such fractions work: 1/3 (sr/3), 1/4 (sr/4), and 1/6 (sr/6). For a 48 kHz sample rate, these correspond to 16 kHz, 12 kHz, and 8 kHz. These frequencies are mainly useful for test signals at very small amplitudes; at full scale, practical 24-bit implementation is indistinguishable from perfect.

Examples

At 48 kHz: perfect sine at 16 kHz (sr/3), 12 kHz (sr/4), 8 kHz (sr/6). Pattern: 0,A,-A,0,A,-A… for sr/3; A,A,-A,-A,A,A… for sr/4; A,A,A,-A,-A,-A… for sr/6. Do not dither these test signals — dither only adds noise to something noise-free.

Assessment

Explain why frequency sr/5 cannot produce a quantization-free sine wave, using the constraint that only values {0, +A, -A} are permitted per sample.

“1/3, 1/4, and 1/6. For a 48 kHz sample rate, we can have perfect 16, 12, or 8 kHz sines.”
corpus · earlevel-engineering-digital-audio-dsp-blog · chunk 4