53 · Bonus · Spectral Images

Building a Spectrum Without an FFT

This final page comes at the spectral chapter from the opposite direction. Instead of asking an FFT “what frequencies are in this sound?”, we deliberately create the frequencies ourselves using 256 oscillators — then let a spectrogram analyse the result and show us what we built.

Important: no FFT, IFFT, FFT windows or overlap-add are used to synthesise the sound on this page. The WAV is created by ordinary additive synthesis. FFT/STFT analysis enters later, when software such as iZotope RX displays the resulting audio as a spectrogram.

1 · Change what the axes mean

IMAGE X → TIME
IMAGE Y → OSCILLATOR FREQUENCY
PIXEL BRIGHTNESS → OSCILLATOR MAGNITUDE

The image is resized to 256 rows. Each row controls one sine oscillator at a different frequency. Moving from left to right through the image changes the magnitudes of those 256 oscillators through time.

This is not hiding an image file inside a WAV. We are genuinely generating the frequencies represented by the pixels. The image becomes a set of amplitude envelopes controlling an additive synthesiser.

2 · Spectral image synthesiser

6.0 s
500 Hz
12000 Hz
1.00

SOURCE IMAGE

SYNTHESISED AUDIO · SPECTROGRAM

BUILDING SPECTRAL AUDIO… 0%
Image grid256 × 256
Time columns256
Frequency rows256
StatusSMILEY READY

The default smiley is deliberately simple. Build it, play it, export the WAV, then open the WAV in a spectrogram such as iZotope RX. RX performs the FFT/STFT analysis needed to display the spectrum. Adjust its spectrogram range/contrast if necessary — you should see the face emerge.

3 · Watch the scan

The amber line moves through time. At each horizontal position, the 256 pixel values become 256 oscillator magnitudes.

COLUMN 0 → COLUMN 1 → COLUMN 2 → … → COLUMN 255

256 PIXELS → 256 MAGNITUDES → 256 OSCILLATORS

So a vertical slice of the picture describes many simultaneously sounding frequencies. This resembles a spectral frame as a representation, but we are not constructing it with FFT bins or an IFFT.

4 · What are we actually synthesising?

This is the additive-synthesis idea from earlier in the course, simply scaled up. Imagine a bank of 256 sine oscillators, each with its own continuously changing volume control.

IMAGE ROW r → OSCILLATOR fᵣ
PIXEL BRIGHTNESS → Aᵣ(t)

x(t) = Σ Aᵣ(t) · sin(2π fᵣ t + φᵣ)

We calculate those oscillators sample by sample and add them together. There is no BLOCK → WINDOW → FFT → BINS → IFFT → OVERLAP-ADD synthesis chain here.

Image propertyAudio meaning
Left → rightEarlier → later
Bottom → topLow → high frequency
Black → whiteQuiet → strong spectral component
Horizontal lineSustained frequency
Vertical lineMany frequencies occurring together
CurveFrequency trajectory through time

5 · Now let the FFT find what we made

Export the WAV and open it in a spectrogram such as iZotope RX. The analyser does not know that we started with a picture. It only receives audio.

OUR GENERATOR
IMAGE → 256 OSCILLATORS → ADD → WAV

↓

SPECTROGRAM ANALYSIS
WAV → WINDOWED BLOCKS → FFT → MAGNITUDES → COLOUR / BRIGHTNESS → IMAGE

The spectrogram repeatedly analyses overlapping pieces of the WAV. Successive analyses create the horizontal time axis; frequency becomes the vertical axis; magnitude becomes colour or brightness.

The picture reappears because the frequency and magnitude relationships are really present in the audio. We never give the analyser the original photograph.

6 · Additive synthesis meets FFT analysis

Earlier question

Given some audio, what frequencies are in it?

AUDIO → WINDOW → FFT → BINS

This bonus experiment

I want these frequencies to exist — how can I make them?

MAGNITUDES → OSCILLATORS → ADD → AUDIO

These are two ways of approaching the same frequency-domain description. One analyses a sound; the other deliberately synthesises a sound whose spectrum we already chose.

FFT / Spectral Chapter · Bonus Finale

Full circle

IMAGE → ADDITIVE SYNTHESIS → AUDIO → FFT / STFT ANALYSIS → IMAGE

We began synthesis much earlier with oscillators, amplitude and addition. We later learned blocks, windows, FFT bins, overlap and spectral processing. This experiment brings those two worlds together: 256 ordinary oscillators build the sound; FFT analysis reveals the spectral structure they created.

Same sound. Different representations. And now we know what is happening on both sides.