Skip to content

PlaygroundSignals · 03

Uncertainty

Step 1

One window, one compromise.

The test sound holds four things: two low notes a whole tone apart that play all the time, a short high blip, a click, and a rising sweep. A spectrogram shows it through a sliding window of time: time runs left to right, pitch bottom to top. Change the window length and watch the click and the two low notes.

0 s1 s2 s
4 ms256 ms

What one window can resolve

Wide and flat, or tall and thin: the area never changes.

Step 2

What is a wavelet?

A Fourier transform compares the sound with sine waves that go on forever. A wavelet is a short burst of wave instead: a few oscillations that swell and fade.

To look for a low note you stretch the wavelet; to look for a high one you squeeze it. It always keeps the same number of oscillations, so its length follows the pitch: long for low notes, where you need patience to pin down the pitch, short for high sounds, where you need precision in time.

A spectrogram uses one window length for every pitch. Wavelets choose a different one for each, which is also roughly how your ear works.

High pitch

short: precise in time

Middle

Low pitch

long: precise in pitch

The same wavelet, stretched or squeezed

Step 3

Wavelets adapt.

The same sound, analysed with wavelets. The click stays a sharp line and the two low notes stay apart: no single window length in step 1 manages both.

0 s1 s2 s

How they divide time and pitch

Fixed window: the same tile everywhere
Wavelets: narrow up high, wide down low

Sharp click and separate notes, in one picture.

Every tile still has the same area: the uncertainty principle is not broken, only spent differently at each pitch.

What's going on

Any way of looking at a sound over time has to decide how long to listen. Short looks are precise in time and vague in pitch; long looks are the reverse. The two precisions multiplied together can never drop below a fixed limit: the time-frequency uncertainty principle, the same mathematics as Heisenberg's.

Wavelets do not escape the limit. They spend it differently at every pitch, in the way that suits music: fast detail up high, slow notes and harmony down low.

Why it matters: how you look at a sound decides what a model can learn from it. Multi-resolution representations like wavelets are one of the directions our members explore; see Research.

The maths behind itFor the curious · formulas and details

The uncertainty principle

A window of length Δt can only tell apart frequencies that are roughly 1/Δt apart. With both measured as standard deviations, the Gabor limit (the same maths as Heisenberg's) is:

Δt · Δf ≥ 1 / 4π

The slider runs from 32 samples (4 ms, frequency resolution about 250 Hz) to 2048 samples (256 ms, about 4 Hz) at 8,000 samples per second. The two notes are 196 and 220 Hz, 24 Hz apart; with a Hann window they only separate from about 1024 samples (128 ms) on.

Wavelets

The Morlet wavelet is a complex sine under a Gaussian. It is stretched by a scale s and shifted by a time τ, and the transform correlates the signal with every stretched copy:

ψ(t) = e^(iω₀t) · e^(−t²/2)    W(s, τ) = (1/√s) ∫ x(t) · ψ*((t − τ) / s) dt

Every copy holds the same number of cycles (24 here), so its length in time is inversely proportional to its frequency: constant relative bandwidth, which is also roughly how the inner ear resolves pitch. The tiling sketches in step 3 are schematic (linear axes), but the areas are honest: every tile covers the same Δt · Δf.