Every sound is a mix of frequency components, and the Fast Fourier Transform (FFT) decomposes that mix into "how much energy at each frequency." The Web Audio API's AnalyserNode.getByteFrequencyData() does this in real time, powering music-player bar equalizers and "listening" animations for voice assistants.
Visualizations usually group far fewer bars (16-64) than the actual analysis resolution (1024-2048 FFT bins) — drawing every bin looks like noise and wastes CPU. Keep the sound's own volume low, but give the visualization a minimum bar height so it doesn't look silent even at low volume. A live spectrum display (streaming, calls) doubles as visual confirmation that audio is active, which helps muted users too.
Used in music player equalizers, live-stream overlays, a voice assistant's "listening" indicator, and spectrograms in audio-editing tools.
When to use
Use it whenever you need to visually confirm audio is actually playing. Reduce to 16-64 bars for readability.