The signal x(t) = Σ Aₙ·sin(2π·fₙ·t + φₙ) is sampled at 8 kHz, windowed, and run through a recursive radix-2 Cooley–Tukey FFT: X[k] = Σ x[n]·e^(−2πi·nk/N), computed in O(N·log₂N) instead of O(N²). Windowing tapers the block edges to reduce spectral leakage at the cost of a wider main lobe. The spectrogram stacks successive FFT magnitude columns (the Short-Time Fourier Transform) into a time-vs-frequency heatmap so you can see the spectrum evolve, e.g. during a chirp.