opyeb WaveLab

Guides · Analysis

Reading a spectrogram

Basis 28 Nov 2026 · digital signal processing · 6 min read

A spectrogram is a series of short FFTs laid side by side, with time along one axis, frequency along the other and colour for level. It is the single most useful display for sound because it shows structure that a single spectrum cannot: a tone that starts, a sweep, a click.

How the waterfall is drawn

Each column is one frame: take N samples, multiply by the window, transform, convert to decibels, and map the level to a colour. New frames arrive on the right and older ones scroll left. WaveLab keeps a fixed pixel buffer and shifts it, so the display costs almost nothing per frame beyond the transform itself.

Why the axes fight each other

Frequency resolution is roughly fs/N and time resolution is N/fs. Doubling N halves the frequency smearing and doubles the time smearing: a click becomes a vertical smudge spanning two frames, while a tone that changes pitch becomes a staircase. There is no setting that removes both, because the trade is a property of the Fourier transform, not of the implementation.

FrameFrequencyTimeGood for
51293.8 Hz10.7 msclicks, onsets, rhythm
1 02446.9 Hz21.3 msspeech, instruments
2 04823.4 Hz42.7 mssteady tones, harmonics
4 09611.7 Hz85.3 msclose tones, slow sweeps

What to look for

Horizontal lines are steady tones; their thickness is the window's main lobe, not the tone's width. A stack of evenly spaced lines is a harmonic series, and the spacing is the fundamental. A diagonal is a sweep, and its slope is hertz per second. Vertical stripes are transients, and their width is the frame length — which is why a click looks wider at N = 4 096 than at N = 512.

Colour matters too. In this display the map is linear in decibels over a fixed range, so a faint line means a level roughly 40–60 dB below the strong one. If you change the noise slider and the whole background brightens, that is the floor rising, not the signal changing.

A worked reading

Set tone 1 to 440 Hz at 0.5 V, tone 2 to 1 000 Hz at 0.25 V and N = 2 048. The spectrogram shows two horizontal lines whose height difference is about 6 dB, matching the amplitude ratio. Increase N to 4 096 and both lines get thinner; the time axis gets coarser. Sweep tone 2 from 600 to 1 500 Hz with the number field and the line tracks it as a staircase of 85 ms steps.

Questions

Why does a real instrument look like a series of dashes rather than a line?

Because its harmonics move in pitch and level from note to note, and because the frame is sampling a changing signal. A perfectly steady tone drawn with a short frame looks continuous.

Is a spectrogram better than a spectrum?

It carries more information but reads less precisely: a level taken from colour is coarser than a number taken from a bin. Use the spectrum for values, the spectrogram for structure.

Watch the 440 Hz line while you change N: its thickness is the window, not the tone.

Open the studio

Written from standard Fourier analysis, digital signal processing and acoustics; the worked numbers can be reproduced in the studio linked above.

Back to the guides