When you chop a signal into a finite chunk to analyze it, the hard edges leak — a single pure tone smears into a blur of nearby frequencies (spectral leakage). The fix: fade the chunk’s edges gently to zero with a WINDOW (like the Hann bell) before transforming. Sharp corners become soft, and the leakage collapses. It’s the difference between a smudged spectrum and a clean one. Slide from a hard box to a soft Hann.
Analyzing a finite signal segment implicitly multiplies it by a rectangular window, whose sharp edges convolve the true spectrum with a wide sinc — smearing a single tone into side-lobes (SPECTRAL LEAKAGE). A tapered window (Hann w[n]=½(1−cos 2πn/(N−1)), Hamming, Blackman, etc.) fades the segment smoothly to zero, trading a slightly WIDER main lobe for far LOWER side-lobes — dramatically less leakage. The choice is a resolution-vs-leakage trade central to spectrograms, the [[the-fast-fourier-transform|STFT]], and any real spectral estimate. A fail-loud self-check throws unless the Hann window is zero at both ends and peaks near 1 in the middle. ◆ real signal math, node-verified.
No window is best for everything — each trades main-lobe width (resolution) against side-lobe level (leakage). The Hann shape and the leakage-vs-resolution trade are exact.