spectral

A singing-voice spectral analyzer that runs in your browser, and the wrist-worn instrument it was built for.

Super Spectral is a wrist-worn singing-voice spectral analyzer being built on an ESP32-S3 smartwatch. This page is its other half: the browser analyzer its founding research document specified first, which grew into an instrument in its own right.

It runs entirely in this browser — the microphone stream goes into an AudioWorklet, the transform runs in a Worker, the spectrum is drawn on a canvas and the waterfall on a WebGL history ring. No audio leaves your machine and there is no backend in the live path. Your browser will ask for microphone permission the first time you press Start capture, in whichever of the two frames below you press it.

A tuner, to start with

This is the whole analyzer opened in Tune: one note, one cents figure, one needle, because you can only look at one thing at a time. The small line under the number is the measured reading — never smoothed, never held — and the damping applied to the needle prints its own time constant beside it, so you always know how much of what you are seeing is filtering. Hold freezes the reading after a phrase.

Tune is a display mode, not a second application: this card and the analyzer below are the same bundle, the same capture chain and the same stored preferences. Opening this card in Tune is a fact about this page view and is never remembered — but pressing Perform or Study inside it is an explicit choice, and that one is, from the next page load onward.

The analyzer

On a phone, open it full screen rather than using the frame below.

Three displays, one measurement. The control is at the top of the readout bar, where nothing can hide it. Perform is the singer’s screen — pitch in cents against time, over the spectrogram. Study is the instrument’s — the spectrum with its harmonics labelled. Tune is the one you can look at while singing: the canvases give way to a single readout, note over cents over a needle, because you can only look at one thing at a time. Every mode reads the same frame from the same estimator; Tune adds a display filter and prints its own time constant under the number, so you always know how much of what you are seeing is smoothing.

Capture a note, then reach it. Hold a note for half a second and press Capture reference: the analyzer keeps its pitch and its spectrum, draws the spectrum as a dotted ghost, and from then on tells you — in words, and with a needle on a cents bar — whether the note you are singing now is in tune, flat or sharp against it. Pitch decides; the ghost is there so you can see how close the timbre is. Or just type the note you are aiming at. The reference stays in your browser and survives a reload — and because both frames on this page are the same application on the same origin, a reference captured in one is there in the other the next time it loads.

Or practise against a recording. Load an audio file and it becomes the source, through the same worklet and the same Worker as the microphone — with a player bar, a loop you set with A and B and can see drawn on the seek track, and a stretch slider that re-renders the loop up to 32× slower at the same pitch: a held drone you can tune to and sing over. A stretched loop is labelled derived everywhere it is named, because it is a resynthesis and not the recording.

The controls fold away — on a laptop the column collapses to a strip, on a phone it is a sheet you pull up — and the readout bar at the top never moves, whatever else does.

The analyzer follows this site’s light/dark setting. Latency and refresh rate here are measured, never claimed, and they are properties of your browser and this machine — they say nothing about the watch, which does its own real-time work on its own silicon.

The instrument behind it

The six analysis presets loaded here are the same files the watch firmware loads, embedded byte-for-byte and hashed in the browser so the digest you see can be compared against the repository. Across nineteen synthetic spectra the worst disagreement between this TypeScript implementation and the Python reference is 1.9 × 10⁻⁵ dB, and the pitch estimator is held to Praat on the same goldens to a worst median of 1.03 cents.

The analyzer is under active development. Ring/twang and formant overlays follow. It is GPL-3.0-or-later — this site is MIT, but the analyzer is the user interface of a GPL program and carries that program’s licence.