Reading a Spectrogram: A Beginner's Guide to Time-Frequency Plots

Reading a Spectrogram: A Beginner's Guide to Time-Frequency Plots

A spectrogram is the most useful picture in audio. Show one to someone who has never seen it and they will see coloured clouds. Show it to an engineer and they will point out where the snare lands, whether that hum is mains-related, and how much hiss is sitting under the vocal. The difference is not talent. It is a handful of habits, and most of them take an afternoon to pick up.

This guide covers what the axes mean, how to interpret colour honestly, and why the window size you choose changes what you are able to see. By the end you should be able to describe what is happening in a recording without pressing play at all.

Time runs across, frequency runs up

The horizontal axis is time, reading left to right, exactly like a waveform. The vertical axis is frequency, low at the bottom, high at the top. Colour or brightness represents level: how much energy is present at that frequency at that moment. Every pixel is a small slice of time at a narrow band of frequency, with a number attached.

Before you interpret anything, check the axis labels. A frequency axis can be linear or logarithmic, and the two look very different. On a linear axis, harmonics that are equally spaced in hertz appear equally spaced on screen. Switch to a log axis and that ladder fans out towards the top, because equal musical intervals — an octave, say — cover more hertz as you go up. Neither is wrong. A log axis matches how we hear; a linear axis makes it easy to measure spacing in hertz.

Also check the range being shown. If the display stops at 8 kHz, you will not see the cymbal shimmer or the sibilance that makes a vocal sound harsh. Zoom out before you conclude that something is missing.

Colour is level, and the scale you choose matters

Most tools map level to colour across a range of decibels — something like 80 dB from the quietest shade to the brightest. That range is a control, not a fixed truth, and moving it changes the story you see.

Widen the range and quiet detail appears: reverb tails, room tone, the faint hiss of a noisy preamp. Narrow it and you get stronger contrast in the loud material, at the cost of crushing everything beneath the floor into a single flat shade. If a plot looks empty, widen the range or lower the floor before you believe it.

Palette matters too. Perceptually even maps such as greyscale or viridis make it easier to judge relative level, because a step in brightness corresponds to a step in decibels. Rainbow scales are popular but can invent boundaries that are not there, and they make it hard to tell a genuinely louder band from a colour transition. When you are trying to measure rather than admire, greyscale is often the better choice.

A spectrogram is not a photograph of sound. It is a summary drawn with the settings you chose, and different settings draw different summaries.

Window size: you cannot have both resolutions at once

Every spectrogram is built from short overlapping chunks of audio. You take a chunk, run a Fourier transform on it, and get the frequency content of that moment. The length of that chunk is the window, usually written as a number of samples: 256, 1024, 4096.

The window length sets a trade-off you cannot escape. A long window resolves frequency finely but smears events in time. A short window pins down timing sharply but blurs pitch and struggles to separate low notes. The rough relationship is worth remembering: time resolution is about the window length, and frequency spacing between the resulting bins is the sample rate divided by the window length.

At a 44.1 kHz sample rate, a 1024-sample window is roughly 23 milliseconds long and gives bins about 43 Hz apart. A 4096-sample window is about 93 milliseconds, with bins around 11 Hz apart. That difference decides whether two closely spaced bass harmonics appear as two lines or one thick smear.

Starting values that usually work

  • 256–512 samples: transients, drum hits, clicks, plosives. Expect blurry pitch.
  • 1024–2048 samples: the general-purpose overview for music and speech.
  • 4096–8192 samples: pitch detail, low bass, separating harmonics of a deep note.

Overlap, often called hop size or window overlap, controls how smoothly the image is drawn. It does not create resolution that the window length never had. Nor does the choice of window function: a Hann window reduces the smearing that spills energy between bins, which is why it is the usual default, but it cannot make a short window see low frequencies clearly.

What common sounds look like

Once you know what to look for, most recordings become readable in seconds.

  • Steady tone: a straight horizontal line. A slight ripple up and down is vibrato; a wobble in level is tremolo.
  • Harmonic instrument: a ladder of parallel horizontal lines. The spacing between rungs is the fundamental frequency, and the lowest rung is not always the brightest.
  • Transient: a vertical stripe, usually bright across the whole frequency range. It lasts one or two pixels if your window is short.
  • Hiss: a faint, even haze spread across the top of the display, with no structure.
  • Hum: solid horizontal lines at 50 Hz and its multiples in the UK, at 60 Hz in North America. Mains hum and its harmonics look like a tidy ruler.
  • Sweep: a diagonal line, either rising or falling. Test tones and some synth effects do this deliberately.
  • Gating or chopping: a dashed line, where the same frequency appears and disappears in a regular rhythm.
  • Clipping and heavy distortion: extra harmonics stacked above a fundamental, and broadband streaks at the loudest moments.

Read along the time axis to follow events, and along the frequency axis to identify pitch. If you want to measure something, use the cursor readout rather than guessing from the colour.

A ten-minute routine that actually builds the skill

  1. Open a free analyser and load a recording you know well — your own voice, a favourite track, a drum loop.
  2. Note the settings first: sample rate, window size, colour range. Write them down if you plan to compare plots later.
  3. Switch to a short window and watch the transients sharpen. Switch to a long one and watch the pitch lines thin out.
  4. Widen and narrow the colour range and see what appears and disappears.
  5. Play a known reference next to it — a single sine tone, or a clean recording of the same instrument — and compare shapes.

Keep one habit above all: when something surprises you, change a setting before you change your mind about the recording. Most misreadings come from a window that is too long for the rhythm, a colour range that is too narrow to show the noise floor, or an axis range that hides the top octave. The spectrogram rewards patience, and the skill transfers immediately to editing, noise reduction and diagnosis of problem recordings.

Photo: StockSnap / Pixabay