Windows & Spectral Leakage
Page 47 showed a pure sine spilling into neighbouring bins. Now we ask the important question: why? The answer begins with something very ordinary — we chopped out a finite block.
1 · The FFT sees a block, not an endless waveform
For interpretation, that finite block behaves as though it could repeat. If the end of one copy does not meet the beginning of the next cleanly, the implied repeating waveform contains a sudden jump.
2 · Make the boundary problem visible
FINITE BLOCK
REPEATED BLOCK
Rectangular means “no taper”: every sample is weighted by 1. The other windows reshape the block before the FFT.
3 · Windowing is just MULTIPLY again
WINDOW SHAPE
WINDOWED WAVEFORM
A window gives each sample in the block a weight. The centre is usually kept strong while the edges are reduced. That softens the artificial boundary created by cutting the block.
4 · Watch the leakage pattern change
The vertical lines are FFT bin centres. The plotted curve is the actual DFT magnitude of the finite windowed sine block.
5 · No perfect window
| Window | What it does well | What it costs |
|---|---|---|
| Rectangular | Narrowest main lobe when perfectly bin-centred | Strong sidelobes / leakage when boundary mismatches |
| Hann | Good general-purpose leakage reduction | Wider main lobe, lower coherent amplitude |
| Hamming | Lower first sidelobe than rectangular | Also widens the main lobe |
| Blackman | Very strong distant sidelobe suppression | Even wider main lobe / more spectral spreading near the tone |
6 · Try the two revealing cases
Rectangular can become extremely concentrated
Rectangular leakage becomes obvious
Then keep the sine off-bin and switch to Hann, Hamming and Blackman. The tone has not changed. The measurement strategy has.
Overlap & Reconstruction
Great — we've faded the edges of every block. But if we're processing audio and transforming it back, those faded edges would leave holes. So how do we stitch the blocks together?
Next we'll overlap neighbouring blocks and watch their windows sum back into a continuous signal.