A spectrogram is a time-frequency power map created by computing the STFT frame-by-frame and plotting energy per bin
A spectrogram visualises how the frequency content of a sound changes over time. It is computed by applying a Short-Time Fourier Transform to overlapping windowed frames of the signal. The result is a 2D grid: time on the x-axis, frequency on the y-axis, and energy (typically in dB) on a colour or greyscale scale. Each column of the grid represents one FFT frame spectrum. Percussive events appear as vertical streaks (broadband energy at a point in time); sustained tones appear as horizontal lines (stable frequency over time); noise fills the entire plane. The spectrogram is the primary visual tool for understanding and debugging sounds in computer music and is the input to most machine listening algorithms.
Examples
A drum loop spectrogram shows vertical bands at each hit. A singing voice shows horizontal harmonic bands with vibrato. The Sonic Visualiser tool displays spectrograms interactively.
Assessment
Describe what a sustained pitched tone looks like in a spectrogram, versus a sharp percussive hit. What is the trade-off between window size and the sharpness of these features?