34 — Spectral Morph

Blend the spectral character of two audio sources via FFT magnitude interpolation. The morphed output is a genuinely new timbre — not a crossfade.

Source B waveform:  
How it works: Every 256 samples, the AudioWorklet FFTs both sources (1024-point Cooley-Tukey), blends the magnitude spectra linearly, keeps Source A's phase, then IFFTs back to audio via overlap-add synthesis. Moving the slider to 0.5 produces a timbre distinct from either source — unlike a crossfade, which just mixes them.

Demo: Source A = sawtooth (many harmonics, 1/n decay). Source B = sine. At full A the buzz is clear; at full B only the fundamental remains; at 0.5 the harmonics are halved in amplitude, changing the timbral quality.

Mic mode: Play piano or sing into Source A. Source B is always a synth tone. Morph toward B to gradually dissolve your playing into a sine wave at the same frequency and phase structure.
← dream sandbox · design notes
The dream lab — Karel Barnoski