STFT & Spectrogram

This interactive simulator explores STFT & Spectrogram in Визуализация математики. Slide a windowed FFT across the signal: chirps, two-tones, bursts. Tune window M, hop, type — see the time–frequency trade-off live. Use the controls to change the scenario; watch the visualization and any graphs or readouts to connect the model with lectures, labs, and homework.

Для кого: Best once you already know the basic definitions and want to build intuition. Typical context: Визуализация математики.

Ключевые понятия

  • stft
  • spectrogram
  • stft spectrogram
  • math

Как это работает

**Short-Time Fourier Transform**: slide a window **w[n]** of length **M** across the signal in steps of **hop**, FFT each frame, plot **|X(t,f)|** in dB as a heatmap. There is a hard **time–frequency trade-off**: large **M** sharpens **Δf = f_s/M** but blurs **Δt ≈ M/f_s**; small **M** does the opposite. Try the **up-chirp** with M = 32 vs M = 1024, or compare windows on the **two-tone** preset to see leakage on a rectangular window vs Hann/Blackman side-lobes.

Основные формулы

X(m, k) = Σₙ x[n + m·H] · w[n] · e⁻²πⁱᵏⁿᐟᴹ
Δt = H/f_s, Δf = f_s/M (Heisenberg Δt·Δf ≥ 1/(4π))