STFT and spectrogram representation: Plotting and manipulating a sound in the frequency domain

The short-time Fourier transform (STFT) is a sequence of discrete Fourier transforms applied to successive, usually overlapping, “frames” of an audio signal. Plotting the magnitude of these succession of DFTs gives us the classic spectrogram representation, with time running left to right, frequency running vertically, and some kind of greyescale or colour mapping indicating DFT magnitude. In this demo a basic spectrogram is plotted, along with various interesting manipulations of it, such as zeroing out the phase (either to a whole-signal single DFT, or frame-by-frame).

Use the preset musical scale, or load or record your own sound.

Open full-screen ↗