|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This tutorial demonstrates the Fast Fourier Transform, the algorithm that connects the time domain (a waveform you can plot) to the frequency domain (the sine-wave ingredients that make up that waveform). The FFT is foundational to signal processing, audio analysis, communications, and almost every form of scientific computing that touches time series. The simulator uses additive synthesis with up to 20 sine-wave oscillators, then runs the FFT on the composite signal in real time. The top panel shows the time-domain waveform (white) and its individual oscillator components (rainbow). The bottom panel shows the FFT spectrum, with yellow markers at each active oscillator's frequency so you can see synthesis and analysis side by side. Sections Mathematical FoundationThe continuous Fourier transform decomposes a time-domain signal X(f) = ∫ x(t) · e−j2πft dt
For a digital signal sampled at discrete points X[k] = Σn=0N−1 x[n] · e−j2πkn/N
A naive evaluation of the DFT is Additive SynthesisThe signal generator builds its waveform by summing sine waves — the inverse of what the FFT does on the receive side: x(t) = Σi=120 Ai · sin(2π fi t + φi)
Each oscillator Waveform RecipesEvery periodic waveform has a unique "harmonic recipe" — the set of frequencies and amplitudes that sum to produce it. The preset dropdown loads these recipes into the oscillators:
Why Church Bell looks different: harmonic waveforms (square, sawtooth, violin…) have integer frequency ratios, so all components share a common period and the waveform repeats exactly. Inharmonic content (bell, drum) does not — the composite signal never repeats, which is why the spectrum bars are unevenly spaced and the time-domain trace keeps morphing.
FFT Analysis ParametersThe simulator runs at audio-CD sampling and uses an N = 1024 FFT:
Frequency resolution limit: two tones closer in frequency than
Δf ≈ 43 Hz fall into the same bin and appear as a single peak. To resolve them you need either a longer FFT (more bins) or a longer integration window — this is the time/frequency uncertainty principle in practical form. The Two-Tone Beat preset (200 Hz vs 220 Hz, separation 20 Hz) deliberately sits inside one bin so you see beating in time but a smeared peak in frequency.SimulationThe interactive simulator is below. Pick a waveform preset to load a known harmonic recipe, then watch the time-domain waveform (top) and the FFT spectrum (bottom) update together. Toggle Show Oscillators to overlay the individual sine components on the time trace, or pause to study one frame. Fine-tune any of the 20 oscillators using the per-row frequency / amplitude / phase / enable controls. Oscillator Controls
Oscillator 1
200 Hz
30%
0°
Oscillator 2
400 Hz
30%
0°
Oscillator 3
600 Hz
30%
0°
Oscillator 4
800 Hz
30%
0°
Oscillator 5
1000 Hz
30%
0°
Oscillator 6
1200 Hz
30%
0°
Oscillator 7
1400 Hz
30%
0°
Oscillator 8
1600 Hz
30%
0°
Oscillator 9
1800 Hz
30%
0°
Oscillator 10
2000 Hz
30%
0°
Oscillator 11
2200 Hz
30%
0°
Oscillator 12
2400 Hz
30%
0°
Oscillator 13
2600 Hz
30%
0°
Oscillator 14
2800 Hz
30%
0°
Oscillator 15
3000 Hz
30%
0°
Oscillator 16
3200 Hz
30%
0°
Oscillator 17
3400 Hz
30%
0°
Oscillator 18
3600 Hz
30%
0°
Oscillator 19
3800 Hz
30%
0°
Oscillator 20
4000 Hz
30%
0°
0.001x
FFT Analysis InformationSample Rate: 44,100 Hz
FFT Bins: 1024
Frequency Resolution: ~43 Hz per bin
Nyquist Frequency: 22,050 Hz
Usage
Parameters
Key Concepts
LimitationsThis is an educational visualizer, not a production DSP tool. Notable simplifications:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||