Clever Quest Lab ← Labs

Sound Visualizer

See any sound – microphone, computer audio or a file – as a live oscilloscope, spectrum, spectrogram and pitch, and measure its distortion, noise and bandwidth.

Microphone, computer and file audio is analysed in your browser and is not uploaded. When you share computer audio, the picture of your screen is not used, recorded or uploaded.

Sound is off. Press a source button to begin.

Oscilloscope amplitude against time

Spectrum level in dBFS against frequency in Hz

Peak –

A – · B –

Click or tap the spectrum, or focus it and press A or B, to place a marker.

Spectrogram frequency against time

Pitch

–
– Hzno clear pitch

Level

RMS – · Peak –CLIP

Measurements

Peak
–
−3 dB
–
−6 dB
–
−26 dB
–
Edges
–
THD
–
THD+N
–
SNR
–
A
–
B
–
B − A
–

Start a sound: widths come from the range shown, THD and SNR from the strongest tone.

Next marker

Click or tap the spectrum, or focus it and press A or B, to place a marker.

Writes the frequency and level of every FFT bin to a file.

Levels are in dBFS, relative to digital full scale, and are not calibrated: the same sound reads differently with another microphone, input gain or system volume.

Analysis

–

Oscilloscope and spectrum

Spectrum range
toHz

Spectrogram

Keyboard: Space or F freezes the picture, M mutes. Dragging on the spectrum or spectrogram reads a frequency; a click or tap on the spectrum places a marker.

Runs on your device. Uses your microphone or the sound of another tab or the screen; the audio is processed on your device. Nothing you type or record is uploaded. Keeps working without a connection while the page is open. Works with touch. Saves your analysis, averaging and view settings, the demo choice, volume and the chosen microphone on this device; markers and zoom are not saved.

Added · Updated : added a Measurements panel with peak widths, THD, THD+N and SNR, two markers with their difference, spectrum averaging, zoom and CSV export

How to use it

Pick a source at the top. Use microphone asks for permission and draws whatever the microphone hears. Use computer audio analyses what your computer is playing, such as music, a video or a game, through the browser’s screen-sharing dialog (details in the questions below). Neither source is recorded or played back through the speakers, and the picture of your screen is not used. Open audio file decodes a recording locally and plays it. Play demo starts one of seven built-in test sounds.

Three views update together. The oscilloscope shows the waveform, the spectrum shows which frequencies are present right now, and the spectrogram shows how the spectrum changed over the last 16 seconds. On a phone, switch between them with the tabs.

The Measurements panel reads the spectrum: the strongest peak and its widths, the distortion and noise of a steady tone, and two markers that a click or tap places.

Controls

How it works

From air pressure to samples

Sound is a rapid variation of air pressure. A microphone turns it into a voltage, and the computer measures that voltage typically 44,100 or 48,000 times per second. The oscilloscope draws those samples against time, and that curve is the waveform.

Spectrum and FFT size

Any signal can be written as a sum of sine waves. The fast Fourier transform (FFT) takes a short block of N samples and works out how strong each frequency is. Its result is a row of N/2 frequency bins spaced by

Δf = sample rate ÷ FFT size

At 48,000 Hz and an FFT size of 4096 the bins are 11.7 Hz apart and the block lasts 4096 ÷ 48,000 = 85 ms. A larger FFT separates close frequencies better, but its longer block blurs quick events.

Harmonics and the spectrogram

A musical note is rarely one sine wave. It has a fundamental frequency f plus harmonics at 2f, 3f and so on, and their relative strengths give the instrument its timbre.

A spectrogram lays successive spectra side by side: time runs from left to right, frequency goes up and colour shows the level.

Finding the pitch

The pitch detector compares the waveform with a delayed copy of itself (normalised autocorrelation). The shortest delay at which the two match well is the period T, and the pitch is 1/T. If the match is poor, as with noise, the display shows a dash. The range is 40 Hz to 5 kHz, and notes are named relative to A4 = 440 Hz.

Levels in dBFS

Levels are in decibels relative to full scale:

L = 20 · log10(amplitude ÷ full scale) dBFS

0 dBFS is the largest value digital audio can hold, −6 dB is half the amplitude and −20 dB is one tenth. The spectrum is calibrated so that a full-scale sine wave reads 0 dBFS. CLIP lights up when the signal reaches full scale. The levels are not calibrated to sound pressure: the same sound reads differently with another microphone, input gain or system volume.

Averaging the spectrum

Noise in one bin jumps by several decibels from frame to frame. Averaging adds up the power of successive frames, each at least half an FFT length newer than the last: Linear weighs the last N frames equally, Exponential gives each new frame the weight 1/N. The levels stay the same, only the noise floor steadies, so weak tones stand out. Smoothing averages amplitudes, which reads noise up to about 1 dB low, so the noise figures below use power.

The width of a peak

Even a pure sine wave covers several bins: the analyser multiplies each block by a Blackman window, which keeps far frequencies out of a peak but widens it. A pure tone is 1.64 bins wide at −3 dB, 2.30 at −6 dB and 4.41 at −26 dB, which at FFT size 4096 and 48,000 Hz is 19.2, 26.9 and 51.6 Hz. A wider peak comes from the sound itself: a wavering tone, a resonance, a band of noise.

The page finds where the level first falls 3, 6 and 26 dB below the top of the strongest peak in the range shown, interpolating between bins with a windowed sinc. On a pure tone the top comes within 0.01 bin and 0.05 dB, the widths within 1 %. Q, the frequency divided by the −3 dB width, tells how sharp a resonance is. Edges less than 3 dB above the median level read “in the noise”.

Distortion and noise of a tone

The page takes the strongest peak as the fundamental f and adds up the power around it and around each harmonic 2f, 3f… below 20 kHz: three bins either side, more while the bins hold only the window’s leakage. The other bins from 20 Hz (at least three bins above 0 Hz) to 20 kHz are noise. A harmonic counts only when its top bin stands 13 dB above the noise around it, so a THD below the noise cannot be measured: the panel then says “in the noise” with the most that each harmonic could hold.

THD = √(P2 + P3 + …) ÷ √P1
THD+N = √(P2 + P3 + … + Pn) ÷ √P1
SNR = 10 · log10(P1 ÷ Pn) dB

P1 is the power of the tone, P2, P3… of its harmonics and Pn of the noise. 1 % is −40 dB. SNR here is the tone against the noise that comes with it, not full scale against silence as on a data sheet.

The figures describe the whole chain: sound, microphone or sound card, system processing and input gain. The page asks the browser to switch off echo cancellation, noise suppression and automatic gain, but some devices still process the sound. The panel shows a dash unless one tone holds at least half of the power. Anything within three bins of the tone counts as part of it, and a tone less than 8 bins above 0 Hz (94 Hz at FFT size 4096 and 48,000 Hz) needs a larger FFT size. What the window leaks further counts as noise, so SNR above about 88 dB and THD+N below about 0.004 % cannot be read (lower limits for low tones); the panel then shows “above” or “below”.

Markers and the CSV file

A marker placed near a peak sits on its interpolated top and follows it by up to two bins; elsewhere it reads the level at its frequency. The CSV file has one row per bin, frequency_hz and level_dbfs, plus average_dbfs and peak_hold_dbfs when those are on; lines starting with # list the settings.

Things to try

Frequently asked questions

How do I capture the sound my computer is playing?

In Chrome or Edge on Windows, press Use computer audio, choose Entire screen in the sharing dialog and switch on the option to share system audio. Sharing a browser tab together with its audio also works, including on other desktop systems. A single application window usually gives no sound. Phone browsers do not offer this, and at the time of writing Firefox and Safari share no audio. Keep this page visible in its own window: it pauses while hidden.

Is there a way without screen sharing?

On Windows, some sound drivers offer a recording device called Stereo Mix. Enable it in the sound settings, allow the microphone here once and choose it in the Microphone input list. The visualizer then reads the computer’s output directly.

Why does the pitch show a dash?

The sound has no clear repeating pattern (noise, a clap, several unrelated notes), is too quiet, or lies outside 40 Hz to 5 kHz.

Sources