Learning center

Short-Time Fourier Transform

Examine how spectral content changes across a recording.

SCIENTIFIC METHOD REFERENCE

The STFT takes Fourier transforms of successive windowed signal segments. It produces complex coefficients indexed by time and frequency.

Mathematical principle

S[m,k] = ∑n=0L−1 x[n+mH] w[n] e−i2πkn/K

L is window length, H is hop size, K is transform length, and w[n] is the window.

Input definitions

ItemMeaning
RecordingSamples and sampling rate.
Window lengthDuration represented in each local spectrum.
Hop sizeDistance between consecutive windows.

Analysis choices

ItemMeaning
Window functionControls the weighting of each segment.
PaddingAffects boundaries and frequency-bin sampling.
Displayed quantitySpecify magnitude, squared magnitude, or PSD scaling.

Worked mathematical figure

STFT of an increasing-frequency signal
0320.425.60.819.21.212.81.66.420Time (s)Frequency (Hz)
Synthetic chirp: f(t) = 4 + 8t Hz; 128 samples/s; Hann window of 64 samples; hop of 8 samples. Darker blue indicates larger magnitude; displayed range 0–1 a.u. End regions lack complete windows.

Interpretation

Longer windows generally distinguish nearby frequencies more finely while averaging over a longer interval. More overlap increases temporal sampling of the representation. Boundary treatment and color scaling should be recorded.

Scientific references

Scientific background. Available algorithms, defaults, and settings are defined by the Pop Lab app and release.

From the principle to a scoped workflow

An STFT result needs its window, hop, transform length, boundary handling and displayed quantity. A time–frequency image alone cannot supply those settings or identify whether its color values are magnitude, squared magnitude or density.

Learning pathWhat to inspect and what it establishes
Record windows, hops and display choices

Use the settings lesson to separate input scope, calculation parameters and display controls. Keep time and frequency units with the selected representation.

Evidence scope: This is preparation guidance. Its named FFT/Welch examples do not establish STFT normalization or boundary behavior.

Read padded frames and saved STFT arrays

Inspect the named Earthquake spectrogram example: its numerical grid, padded edge frames and complete older export, alongside a separately reviewed current-source zero-power result.

Evidence scope: Two bounded synthetic cases on separately identified sources. No complex-coefficient export, current positive-layout acceptance, physical PSD validity or whole-method claim.

Watch the scientific explanation

24-second educational animation with synthetic data. No audio; captions and transcript available. Download MP4Video and transcript
Read the video transcript

0:00 The instantaneous frequency of this synthetic chirp is 4 + 8t hertz. Its oscillations become faster over the two-second record.

0:08 A 64-sample Hann window moves through data sampled at 128 hertz, advancing by eight samples at a time. Each window produces a short-time spectrum.

0:16 The spectrogram places those spectra at the window centers. Darker teal indicates greater normalized magnitude. The finite window spreads energy across frequency bins; the plot is not an exact trace of instantaneous frequency.

Read the worked example and download data

Worked examples describe particular inputs, methods and recorded results. Check current availability and input requirements before planning an evaluation.

← Back to the learning center