Fast Fourier Transform (FFT)
Definition
Fast Fourier Transform (FFT)
The Fast Fourier Transform (FFT) is an efficient algorithm that converts a time-domain signal into its frequency-domain representation, decomposing complex sounds into individual sinusoidal components. The Cooley-Tukey FFT reduces the computational complexity from O(N²) to O(N log N), making real-time audio spectrum analysis practical on modern hardware.
The FFT is the mathematical engine behind virtually every modern audio measurement. When SonaVyx captures audio from a microphone, the raw data is a stream of amplitude samples in time. The FFT transforms a block of N samples into N/2+1 frequency bins, each containing a complex number representing the magnitude and phase of that frequency component.
Key FFT parameters and their trade-offs: FFT size (N) determines frequency resolution (Δf = fs/N) and time resolution (T = N/fs). At 48 kHz sample rate, a 4096-point FFT gives 11.72 Hz resolution in 85 ms blocks. Doubling to 8192 points halves the frequency resolution to 5.86 Hz but doubles the block time to 170 ms. This time-frequency trade-off is fundamental and unavoidable — it is a manifestation of the uncertainty principle.
Overlap is used to increase the effective update rate without changing the FFT size. With 50% overlap, each FFT block shares half its samples with the previous block, doubling the display update rate. With 75% overlap, updates are 4× faster. Higher overlap is purely a display improvement; it does not increase frequency resolution or reduce noise.
Windowing must be applied before the FFT to prevent spectral leakage. A finite block of samples implicitly multiplies the signal by a rectangular window, whose sharp edges introduce artificial frequency components (sidelobes). Smooth windows like Hann, Hamming, or Blackman-Harris taper the edges to reduce leakage at the cost of slightly wider frequency bins. The Blackman-Harris window offers -92 dB sidelobe rejection and is SonaVyx default.
For dual-channel measurements (transfer function), the FFT of both reference and measurement signals are computed, and their cross-spectral density gives the magnitude and phase relationship between input and output.
SonaVyx performs all FFT computation in Rust compiled to WebAssembly, achieving near-native performance directly in the browser.
Try It Now
Open this measurement tool in your browser — free, no download required.