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
- Freeze (Space or F) holds the picture; Save PNG downloads all three views as one image.
- Volume and Mute (M) change only what you hear from demos and files, never the analysis.
- Microphone input appears when the browser reports several audio inputs; your choice is remembered.
- FFT size, Smoothing (averages successive spectra), Input gain (scales the signal before analysis) and Display range (the decibel span of spectrum and spectrogram).
- Averaging and Frames to average steady the spectrum; Restart clears the average. While it is on, Smoothing acts only on the spectrogram and peak hold.
- Time base sets how many milliseconds fit across the oscilloscope. Trigger starts every trace at a rising zero crossing, so a steady tone stands still.
- Peak hold keeps the highest level seen at each frequency (switch it off and on to clear). Harmonic markers draw lines at f, 2f, 3f… of the detected pitch.
- Spectrum range sets the frequencies shown; Zoom to peak, Zoom to A–B and Full range set it for you. On a phone these buttons and the main readouts also sit right under the spectrum.
- Point at the spectrum or spectrogram, or drag a finger over it, to read a frequency. A click or tap on the spectrum places a marker; Next marker chooses A or B and Clear removes both. With the keyboard, focus the view and use the arrow keys (on the spectrum Shift + arrow moves by one bin); A or B places that marker at the cursor, + and − zoom, 0 shows the full range and Escape removes the cursor.
- Show the widths on the spectrum draws the −3, −6 and −26 dB widths as green lines. Save CSV writes the spectrum to a file.
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
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:
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+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
- Whistle a steady note. It is almost a pure sine wave: one tall peak. Slide the pitch and watch the line bend in the spectrogram.
- Sing “aah”, then change to “eee” on the same note. The harmonics stay where they are, but different ones become strong as your mouth changes shape.
- Clap. A click is short in time and spread over all frequencies, a vertical stripe in the spectrogram.
- Capture computer audio and play a song: bass and drums fill the left of the spectrum, cymbals the right.
- Compare the square and sawtooth demos: the square wave has only odd harmonics and a THD of about 48 %, the sawtooth has all of them and about 80 %.
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
- W3C (2026). Web Audio API, FFT windowing and smoothing over time. The Blackman window of the analyser and its smoothing of amplitudes.
- Heinzel G, Rüdiger A, Schilling R (2002). Spectrum and spectral density estimation by the Discrete Fourier transform (DFT), including a comprehensive list of window functions and some new flat-top windows. Max-Planck-Institut für Gravitationsphysik. The equivalent noise bandwidth of a window, averaging with overlap and the response of a window.
- Total harmonic distortion (Wikipedia). THD as the ratio of the harmonics to the fundamental, and THD+N.
