Window explorer

A spectrogram slices a sound into short windows and analyses each one. The window length forces a trade-off: long windows separate close frequencies but smear events in time, while short windows do the opposite. The test signal below contains two clicks 50 ms apart and two tones 50 Hz apart. Change the window size and watch what blurs.

Signal and analysis

What to notice: at 16384 the two tones become two thin lines but the clicks smear into wide vertical bands; at 256 the clicks are sharp but the tones merge into one thick line.