Audio Visualization

See sound as waves and frequencies with real-time spectrograms

Seeing Sound

Sound is vibration, and the Fourier transform lets us see what frequencies make up any sound. This is the technology behind music visualizers, equalizers, and audio analysis tools.

Every musical instrument has a unique timbre or tone color, determined by the relative strengths of its harmonic frequencies. A piano and violin playing the same note sound different because their Fourier spectra are different!

Real-Time Audio Analyzer

Generate tones and watch their frequency spectra in real-time. Compare how different waveforms produce different harmonic patterns:

Note: This demo uses the Web Audio API to generate and analyze audio in real-time. The visualization shows the frequency spectrum of the sound being played.

Understanding the Display

Bars View

Each bar represents a frequency range. Height shows how much energy is at that frequency. Low frequencies on the left, high on the right.

Waveform View

Shows the actual audio signal oscillating over time. This is the time-domain view - what a microphone or speaker diaphragm actually does.

Circular View

Same frequency data arranged in a circle - a popular visualization for music players and VJ software.

Harmonics: The Building Blocks of Timbre

When you play a note, you don't just hear a single frequency. You hear the fundamental plus harmonics - frequencies at 2x, 3x, 4x, etc. the fundamental.

For A4 (440 Hz), the harmonics are:

1st: 440 Hz
2nd: 880 Hz
3rd: 1320 Hz
4th: 1760 Hz

In the demo, try square wave to see only odd harmonics (1, 3, 5...) or sawtooth to see all harmonics with decreasing amplitude.

Real-World Applications

Music Production

Equalizers, compressors, and audio effects all work by manipulating the frequency spectrum.

Speech Recognition

Voice assistants use spectrograms (time-varying frequency analysis) to understand speech.

Audio Compression

MP3 and AAC remove frequencies that humans can't easily hear, determined by psychoacoustic models.

Music Identification

Shazam creates fingerprints from frequency peaks to identify songs.