It sounds like this“I can measure exactly when a sound happened and exactly what frequency it has, at the same time.”

Thinking you can know exactly when and exactly what pitch

2 min readBy the Cognosc teamPart of Why is the Fourier transform so important?

Why it feels right

In daily life we hear both at once. A drumbeat has a time, and a note has a pitch, and we hear a melody as pitches in order, so it seems that a sound can be pinned down in both ways at once, as precisely as the equipment allows.

Why it’s wrong

There is a trade-off. Resolving frequencies to within 1 over T hertz needs about T seconds of signal. A 1 second clip can separate tones 1 Hz apart; a 0.01 second click can only tell tones 100 Hz apart. Sharp in time means blurred in pitch.

A worked example

A pitch is a repeating pattern, and you cannot say how fast something repeats without watching it for a while. To tell 100 Hz from 101 Hz you need to watch long enough for the two to drift apart by a whole cycle, which takes 1 second. To tell 100 Hz from 120 Hz, a spacing of 20 Hz, you need only 1/20 of a second.

So analysing a clip of T seconds, the transform can separate frequencies spaced about 1/T apart. A 1 s clip: 1 Hz. A 0.05 s clip: 20 Hz. A 0.01 s click: 100 Hz.

The result is a trade-off. A long window gives sharp frequencies but vague timing, since you can't say when within the window it happened. A short window gives sharp timing and a vague frequency. It is built into waves, the same relation that appears as Heisenberg's uncertainty principle in quantum mechanics. A spectrogram chooses a window length, and changing it trades timing against pitch.

How to catch yourself

  • You expect a spectrogram to be sharp in both time and frequency.
  • You think a better microphone fixes the blur.
  • You can't say why a drumbeat has no clear pitch.

What to hold instead

The better idea

Telling frequencies apart needs time: a window of T seconds resolves frequencies about 1 over T hertz apart. So a sound that is sharp in time is blurred in pitch, and the other way round, whatever the equipment.

Where you’ll meet it

  • Choosing a window length for a spectrogram.
  • Wondering why a click has no clear pitch.
  • Reading about the uncertainty principle.

Questions people ask

What is the time-frequency trade-off?
Resolving frequencies finer needs a longer time window: the smallest separation you can distinguish is about 1 over the window length in seconds. A short window locates events well but blurs the pitch, and a long one does the opposite.
Why does a click not have a pitch?
A click is very short, so its spectrum is spread over a wide range of frequencies. A pitch needs a long enough pattern for one frequency to stand out.

Where it’s taken apart

Caught by it?

Cognosc spots mistakes like this one.

It shows you what really happens, names the exact idea that led you off, and keeps checking you still understand the right one.