|
|
||
|
This interactive tutorial demonstrates the Fast Fourier Transform (FFT), a fundamental algorithm that bridges the gap between the Time Domain (what we see as a waveform) and the Frequency Domain (the ingredients that make up that wave). The FFT is one of the most important algorithms in signal processing, audio analysis, communications, and scientific computing. The simulation uses Additive Synthesis to create complex waves by combining up to 20 sine wave oscillators. Select from various waveform presets to see how different harmonic recipes create distinctive shapes. The Time Domain (top panel) shows the reconstructed waveform (white) along with individual component sine waves (colored). The Frequency Domain (bottom panel) shows the FFT spectrum with yellow markers at each active frequency. ControlsPause/Run: Freezes both the time domain animation and frequency spectrum. Useful for detailed examination of waveform shapes. Waveform Presets:
Show Oscillators: Toggle visibility of individual component sine waves (colored lines) in the time domain. Speed: Control the animation speed of the waveform visualization (0.001x to 1.0x). Slower speeds make it easier to see how component waves combine. Individual Oscillator Controls: Fine-tune each of the 20 oscillators with frequency, amplitude, phase, and enable/disable controls. Visualization FeaturesTime Domain (Top): Shows the reconstructed composite waveform (white line) and optionally each component sine wave (rainbow colors). All waves animate together, demonstrating how harmonics combine to create complex shapes. Frequency Domain (Bottom): Shows the FFT spectrum as colored bars (green→red gradient). Yellow vertical lines mark exact oscillator frequencies with labels. The X-axis automatically scales to fit the highest active frequency plus 20% padding. Mathematical ModelThe FFT is based on the mathematical foundation of the Fourier Transform: Fourier Transform: X(f) = ∫ x(t) e-j2πft dt where x(t) is the time-domain signal, X(f) is the frequency-domain representation, f is frequency, and j is the imaginary unit. The FFT is a fast, efficient algorithm (O(N log N)) that computes the Discrete Fourier Transform (DFT) for digital signals. Additive Synthesis: x(t) = Σi=1N Ai sin(2πfit + φi) where N is the number of oscillators (20 in this simulation), Ai is the amplitude of oscillator i, fi is the frequency of oscillator i, and φi is the phase. The composite signal x(t) is the sum of all active oscillators. Harmonic Series: Different waveforms have characteristic harmonic recipes:
FFT Analysis: X[k] = Σn=0N-1 x[n] e-j2πkn/N where x[n] is the discrete time-domain signal (sampled waveform), X[k] is the frequency-domain output (spectrum), N is the number of samples (1024 bins in this simulation), and k represents frequency bins. The FFT output shows the amplitude at each frequency bin, revealing which frequencies are present in the signal. Key Insight: The FFT is a mathematical "recipe decoder" - it takes a complex waveform (the "cooked dish") and reveals the individual sine wave components (the "ingredients"). Select different waveform presets to see how their unique harmonic recipes appear in the frequency domain. The Church Bell preset is particularly educational - its inharmonic (non-integer) frequency ratios create an unstable, beating waveform that never repeats! 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 ExampleFollow these steps to explore the FFT visualization:
ParametersFollowings are short descriptions on each parameter
Controls and VisualizationsFollowings are short descriptions on each control
Key Concepts
|
||