Chromatic Tuner
Tune any instrument in your browser: allow microphone access and watch the note, frequency and cent deviation update live as you play. Nothing is recorded or sent.
216 views
Listening… play a note
Audio is analysed in memory for pitch detection only; never recorded, never sent anywhere.
Why Autocorrelation Instead of FFT Peak-Finding
Like our Microphone Test tool, this tuner asks for microphone permission through the browser's getUserMedia API, then feeds the live audio stream into a Web Audio API AnalyserNode. From there the two tools diverge: a level meter only needs amplitude, but a tuner needs to know the exact pitch, which is a harder problem. The obvious approach is to run a Fast Fourier Transform and pick the frequency bin with the most energy — but real instruments rarely make that reliable. A plucked guitar string or a bowed violin note is not a pure sine wave; it is a fundamental frequency plus a stack of harmonics, and on many instruments a harmonic (often the octave above) carries more energy than the fundamental itself. An FFT-peak detector can lock onto that harmonic instead, reporting a pitch exactly one octave too high — a classic failure mode called an "octave error."
This tool instead uses autocorrelation, the standard technique for monophonic pitch detection. Rather than analysing frequency content, it works directly in the time domain: it takes the raw waveform captured by getFloatTimeDomainData, then compares the signal against time-shifted copies of itself, sliding across a range of possible lags and summing how well each shifted copy matches the original. Because a periodic waveform correlates most strongly with a copy of itself shifted by exactly one full period, the lag that produces the strongest match is the note's true period — regardless of which harmonic happens to be loudest. That makes autocorrelation considerably more resistant to octave errors than FFT peak-picking. A parabolic interpolation step is applied around the best-matching lag afterward, refining the estimate to sub-sample precision so the cent reading doesn't jump in coarse steps. The whole calculation reruns on every animation frame, reading fresh time-domain samples each time — audio is never recorded or written to a file; it exists only as numbers in memory used to compute one pitch estimate, then it is discarded.
A440, ISO 16, and Why Some Orchestras Tune Sharp
The reference pitch this tuner uses — A4 = 440 Hz — is younger than most people assume, and it used to be genuinely inconsistent. Before the 20th century, "concert pitch" varied from city to city and often from orchestra to orchestra; a note called A in one opera house could measure meaningfully different from the A next door, sometimes by close to a semitone across different regions of Europe. Standardisation only arrived in May 1939, when an international conference held in London agreed on 440 Hz as the reference for the note A above middle C. That agreement was formalised as the international standard ISO 16 in 1955. Even today the standard isn't universal in practice: several European orchestras, including some in Vienna and Berlin, tune slightly sharp of 440 — often to 442 or 443 Hz — a convention generally chosen because a marginally higher pitch is perceived as brighter and more brilliant in a concert hall.
Once a reference pitch is fixed, every other note on a modern instrument is defined by 12-tone equal temperament, the tuning system this tuner assumes when it names notes and calculates cents. Equal temperament divides the octave into twelve equal steps, where the frequency ratio between any note and the semitone above it is exactly the twelfth root of two, approximately 1.05946. That single mathematical rule is what makes a piano playable in every key: earlier tuning systems based on pure harmonic ratios sounded beautifully in tune in one key and audibly sour in distant ones, forcing retuning or restricting composers to a handful of usable keys. Equal temperament trades that purity away evenly, making every key equally — and only slightly — imperfect, but equally usable. Johann Sebastian Bach's The Well-Tempered Clavier (1722) was composed specifically to demonstrate a well-tempered tuning system by working through pieces in all 24 major and minor keys, a showcase that helped popularise the idea that instruments could reasonably be tuned once and played anywhere on the keyboard.
Frequently Asked Questions
Why does this tuner use autocorrelation instead of the simpler FFT peak-finding method?
Real instrument tones contain a fundamental frequency plus harmonics, and on many instruments a harmonic carries more energy than the fundamental. An FFT-peak detector can lock onto that harmonic and report a pitch exactly one octave too high — an "octave error." Autocorrelation searches directly in the time domain for the waveform's true period, which makes it considerably more resistant to this failure and is the standard technique for monophonic pitch detection.
What is A440 and where did it come from?
A440 means the note A above middle C is tuned to 440 Hz, the reference every other note is calculated from. It was agreed at an international conference in London in May 1939 and formalised as the ISO 16 standard in 1955. Before that, concert pitch varied by city and by orchestra, with no single accepted reference.
Why do some orchestras tune to 442 or 443 Hz instead of 440?
It's a stylistic choice rather than an error. Several European orchestras, including some in Vienna and Berlin, tune slightly sharp of the 440 Hz standard because a marginally higher pitch is widely perceived as brighter and more brilliant in performance. This tuner still uses 440 Hz as its reference, so instruments tuned to a higher convention will read consistently sharp against it.
What is equal temperament and why does it matter for tuning?
12-tone equal temperament divides the octave into twelve equal frequency steps, each a ratio of exactly the twelfth root of two (≈1.05946) from the last. It's the system nearly every modern instrument is tuned to, because it makes every key on an instrument playable at the cost of no key being harmonically "pure." Bach's The Well-Tempered Clavier was written specifically to demonstrate this system across all 24 keys.
Is my voice or instrument recorded while using this tuner?
No. Just like our Microphone Test tool, this page never calls the MediaRecorder API — the browser feature responsible for turning a stream into a saved file. Audio only ever exists as live AnalyserNode data read to compute one pitch estimate per animation frame, then it is discarded; nothing is stored or sent anywhere.
Similar Tools
Report a Problem
Chromatic Tuner
Comments
No comments yet — be the first to write one!