A spectrogram is sound split into frequencies and spread out in time: seconds along one axis, pitch along the other, loudness as colour. It shows what the ear hears but cannot name: a violin's overtones, the formants of vowels, a bird's trill. Phoneticians read speech from it, and Shazam recognises a song by the constellation of its brightest points.
How it works
The track is cut into pieces of 4096 samples, each smoothed by a Hann window and split into sinusoids by the fast Fourier transform. Magnitudes become decibels: the top 80 dB map onto the palette, and “Noise floor” cuts off the quietest. Frequencies from 30 Hz to 16 kHz follow the “Frequency scale”: linear (512 bands), log, where every octave gets the same room (256), or mel, following hearing (128).
An uncertainty principle is at work: the longer the window, the sharper the frequency but the blurrier the time. At 48 kHz the window lasts 85 ms and the points sit 11.7 Hz apart, plenty for high notes, but in the bass a semitone is narrower: A at 55 Hz and A sharp are 3.3 Hz apart. So low notes smear on the log scale, and the generator smooths them rather than drawing steps.
A bit of history
Joseph Fourier claimed in The Analytical Theory of Heat (1822) that any function is a sum of sinusoids. In the 1940s Bell Labs built the sound spectrograph, which drew “visible speech” on paper. The mel scale was proposed in 1937 by Stanley Stevens, John Volkmann and Edwin Newman, and the fast algorithm of Cooley and Tukey (1965) made spectra cheap. In 1999 Aphex Twin hid his face at the end of a track on the Windowlicker single; it shows only on a spectrogram.
What to tweak
- On a linear “Frequency scale” the music huddles at the bottom; on log every octave gets an equal band, like a keyboard; mel is closest to hearing.
- “Shape” “spiral” with 6–10 “Spiral turns” coils the track into a record groove; “radial” makes a clock face.
- A higher “Noise floor” and “Gamma” leave only the melody's bright skeleton, “Octave lines” mark pitch, and the “Glow” effect makes an analyser screen.
- Load a track or turn on the microphone and “live” mode scrolls; the Studio sends songs here with “Visualise in Patterns”; a video with sound (“Download” → “Video” → “With sound”) scrolls frame-exact with the music.