Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Fourier Transform Audio Visualizer

Watch the discrete Fourier transform decompose sound into its component frequencies in real time. Use a built-in oscillator with four classic waveforms or grant microphone access to analyze your voice, an instrument, or any ambient sound.

Waveform (time domain)
Spectrum (frequency domain)
Spectrogram (frequency vs time)

Analysis

Source
oscillator
FFT size
2048
Resolution
Dominant frequency
Sample rate

Click Run to play the tone (oscillator) or grant microphone access. The yellow line on the spectrum marks the loudest frequency. Try changing waveform shape to see how the harmonic content changes.

Controls

Hz

Use Run / Pause in the lab controls to start or stop the tone.

FFT settings

Hz
Hz

Display

Music presets

Reference Guide

The Fourier Transform

Any periodic signal can be decomposed into a sum of sines and cosines.

X(f)=x(t)e2πiftdtX(f) = \int_{-\infty}^{\infty} x(t)\, e^{-2\pi i f t}\, dt

The browser uses the discrete fast Fourier transform (FFT) operating on short windowed buffers of the audio waveform.

Harmonic Series

Real instruments produce a fundamental plus integer-multiple harmonics:

fn=nf0,n=1,2,3,f_n = n \cdot f_0,\quad n = 1, 2, 3, \ldots

A square wave contains only odd harmonics. A sawtooth contains all harmonics. A pure sine has only the fundamental.

FFT Size and Resolution

The frequency resolution is the sample rate divided by the FFT size:

Δf=fsN\Delta f = \frac{f_s}{N}

A 2048-point FFT at 48 kHz gives ≈ 23 Hz resolution. Larger FFT = finer frequency detail but coarser time resolution. This is the time-frequency uncertainty principle.

Speech and Music

Human voices typically span 80-1000 Hz fundamentals plus harmonics out to 8 kHz. Vowels have characteristic formant patterns.

Concert A is 440 Hz. Doubling the frequency raises a note by one octave.

The spectrogram on the right scrolls left-to-right showing how the spectrum changes over time.

Related Content