Spectral analysis and processing: FFT, STFT, and the phase vocoder
Learning objectives
- learner can perform windowed spectral analysis (DFT/FFT/STFT), read spectrograms, and reason about the time-frequency resolution tradeoff
- learner can process audio in the spectral domain with overlap-add, phase vocoder, and cross-synthesis for time/pitch and timbre transformation
- learner can apply multiresolution analysis and spectral mapping to advanced sound-design and tuning problems
Capstone — one whole task that evidences the objectives
Use a phase vocoder to time-stretch a recording 2x without pitch change and pitch-shift it up a fifth without tempo change; then cross-synthesize its spectral envelope onto a synth pad, explaining the STFT parameters you chose.
Prerequisite modules
Every live coder eventually hits the wall where sample manipulation stops being enough: the vocal chop needs to stretch across two bars without turning into a chipmunk, the found-sound texture needs to sit in the mix at a different tempo, the ambient set needs a pad that breathes with the formants of a field recording. This module builds toward that whole task — fluent spectral-domain transformation of real material, live, with parameter choices you can defend.
The arc starts supported. You first compute a DFT by hand (the double-loop pseudocode makes the phasor accumulation concrete), then immediately confront why real sounds need windowing to tame spectral leakage. From there you slide the window along a drum loop to build a spectrogram, drilling the habit that anchors everything downstream: reading time-frequency plots and choosing window length against the resolution tradeoff. A real-time spectroscope on your rig makes this a performance skill, not just a plotting exercise. Mid-module the scaffolding loosens — overlap-add reconstruction shows how block-based effects avoid boundary artifacts, and the phase vocoder atoms hand you the machinery to decouple time from pitch, exactly what naive rate-change playback cannot do. The capstone then removes the rails: stretch, shift, and cross-synthesize a recording of your choosing, justifying FFT size, window, and hop.
The required atoms gate this directly — you cannot pick sane STFT parameters without the tradeoff principle, nor explain vocoder artifacts without phase-frame reasoning, nor complete the final capstone step without cross-synthesis, the bin-by-bin spectral multiplication that imposes one sound’s envelope on another; the two L4 procedures (spectral mapping, scale design for inharmonic sources) extend the same toolkit into experimental tuning territory. Supporting atoms enrich the why: Gabor’s uncertainty relation grounds the tradeoff, convolution duality explains cross-synthesis as spectral multiplication, and critical-band psychoacoustics tells you which spectral details the audience will actually hear.
Runnable examples
Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.
reverse-playback
d1 $ sound "bd sn" # speed "-1"
tidal-0056 · CC0
Atoms in this module
Required — these gate the capstone
Supporting — enrichment, not gating
Part of curricula
- Synthesist / Sound Designer — deep DSP to a performed live synth rig — Deep DSP — advanced operators, spectral, physical, formant, procedural required