46 · Spectral Domain

FFT — From Time to Frequency

We've been looking at spectrum analysers for ages. Now we open the box. We already know how to collect a block of samples. The next question is simple: what frequencies are inside it?

1 · Same sound. Two views.

TIME DOMAIN
→
BLOCK
→
FFT
→
FREQUENCY DOMAIN
The FFT does not distort or “EQ” the sound. It gives us another representation of the same block: instead of amplitude changing through time, we can inspect its frequency components.

2 · Hear it → see it

TIME DOMAIN · waveform

FREQUENCY DOMAIN · spectrum

View leftAmplitude / Time
View rightMagnitude / Frequency
Block1024 samples
Sample rate48 kHz

Try one sine, then two. The waveform rapidly becomes harder to “read”; the frequency view makes the components obvious.

3 · So what is the FFT actually giving us?

The FFT takes a finite block and describes it using a set of discrete frequency components. Each position in that frequency representation is commonly called a bin.

BIN = a discrete frequency “bucket” / slot
Time-domain blockFFT result
1024 amplitude samplesA finite set of frequency bins
Where the waveform moves through timeWhere energy/components occur across frequency
Easy to see transients and shapeEasy to see tones, harmonics and spectral balance

For real-valued audio, the useful displayed spectrum normally runs from 0 Hz to Nyquist. We'll unpack exactly how many bins we get and how far apart they are on the next page.

4 · The FFT knows more than the analyser usually shows

A frequency component needs more than “how much?” The FFT also carries phase information.

MAGNITUDE
how much of this component?
PHASE
where is its cycle / angular relationship?

A familiar spectrum analyser mostly foregrounds magnitude. Later, when we transform the spectrum back into audio, phase becomes crucial.

5 · One awkward problem: we chopped out a block

The FFT analyses a finite section. But the original audio did not politely begin and end exactly where our block boundaries appeared.

A useful first intuition: cutting near a compatible zero crossing can produce a much cleaner boundary than chopping through a large sample value. But zero crossing alone is not the full rule — the beginning and end must be compatible with the FFT's periodic view of the block.

If the block boundary creates a discontinuity, the FFT has to describe that discontinuity too. Energy spreads into additional bins. We call this spectral leakage.

6 · So we shape the block before the FFT

AUDIO
→
BLOCK
→
WINDOW
→
FFT
→
BINS

A window gently weights the samples in the block, commonly reducing the edges. And yes — it's our old friend again:

windowed sample = sample × window value

MULTIPLY. We don't need to learn all the window types yet. First understand why the stage exists. Later we'll deliberately create leakage and watch a Hann window change it.

Next · Zoom into the buckets

FFT Size, Bins & Resolution

How wide is each frequency bucket? Why does a bigger FFT separate nearby frequencies more clearly — and what does that cost us in time?

frequency spacing = sample rate ÷ FFT size