A harmonic spectrum demo on a fully
known quasi-vowel: f0 glides 110 → 165 Hz over 3 s carrying harmonics
1..10 at amplitudes 1/h (phase-continuous additive synthesis, sr 22050).
Pipeline: yin(50, 300) f0 contour overlaid on a
log-frequency spectrogram, then f0_harmonics(S, f0, 1..10,
fft_frequencies) renders the f0-normalized harmonic-energy
heatmap — the rows stay FLAT while the raw spectrogram's fixed bins
slope with the glide. Badges (node-verified against dist first): median
yin f0 error < 1% vs the known glide (measured 0.079%); recovered
harmonic amplitude ratios follow 1/h within 15% for h ≤ 5 (measured
within 0.4%); the h=1 harmonic-energy row's coefficient of variation is
< 0.25 while the raw 110 Hz bin's is > 2× larger (measured 0.051 vs
1.84 — 36×). Resynthesis: an additive oscillator bank driven by the
measured f0 + harmonic energies, playable with the original glide or
forced to a 110 Hz monotone — the f0/timbre-decoupling trick, audible.
NOTE: this page tracks f0 with the lightweight yin estimator — plenty for
a clean glide, and the accuracy assertion proves it. For noisy or
polyphonic material, the full HMM/Viterbi pyin is on the curated surface.
computing…