Instrument Tuner — Mic Detection
Free online instrument tuner with microphone pitch detection, cents needle and presets for guitar, violin and more. Private analysis. Runs in browser.
Tool controls
How it works
Real-time time-domain autocorrelation (Normalized Square Difference Function) pitch detection with sub-sample parabolic peak interpolation. Audio is processed purely inside your local browser memory via Web Audio API with zero recording or server transmission.
On this page
An instrument tuner with microphone pitch detection that tracks the fundamental of a plucked or bowed note and reports the cents error against a chosen reference. Pitch analysis runs in your browser with the Web Audio API on a 4096-sample frame; nothing is recorded or uploaded.
How to use it
- Pick a preset from the Tuning Preset menu. Guitar, bass, violin, viola, cello, ukulele, mandolin, banjo and world instruments each load their own string list; Chromatic accepts any note. String rows show targets in hertz, so low E on a standard guitar reads 82.41 Hz.
- Start microphone detection. Click Start Tuner (Microphone) and allow access; the badge switches to Microphone Live. Simulate Audio plays a synthetic note if you want to see the gauge work first.
- Play one string or one sustained note at a time. Palm-mute the other strings, use a normal attack, and give the note about half a second to settle. Analysis refreshes every 50 ms.
- Read the note, the cents badge and the needle. The gauge spans ±50 cents: green is inside the tolerance you selected, amber means flat and red means sharp.
- Change the tolerance if the job needs it. Fine is ±1 ¢, Standard ±3 ¢ (the default) and Casual ±5 ¢.
- Match your ensemble’s reference pitch. Drag the A4 slider from 415 to 450 Hz, or press a chip (A415, A430, A432, A440, A442, A444). Click a string row to lock onto it instead of Auto-Detect Closest.
What the readout shows
The display reports four values at once: the detected frequency in hertz, the target frequency for the active string, clarity as a percentage, and the cents deviation from the target. The needle is damped so small hand movements do not throw it around, while the detector re-runs every 50 ms so a slow turn of a peg still tracks.
Clarity is the confidence of the periodic match. Live microphone input has to clear 85% before a note is reported; a noisy room or two strings ringing together keeps the readout idle. Frequency comes from the composite waveform rather than a single spectral peak, and sub-sample parabolic interpolation turns that period estimate into a sub-cent frequency.
The presets bound the search window, which stops octave errors: guitar presets listen from about 65 Hz to 800 Hz, bass presets reach down to 25 Hz for B0, and Chromatic spans roughly 25 Hz to 2.2 kHz. Presets whose lowest string sits below 70 Hz use a 4× decimated detector that treats the whole frame as its correlation window, which is how a 30.87 Hz B0 is still tracked on a laptop microphone.
| Preset | Strings (low to high) | Target frequencies at A4 = 440 Hz |
|---|---|---|
| Guitar (Standard) | E2 · A2 · D3 · G3 · B3 · E4 | 82.41 · 110.00 · 146.83 · 196.00 · 246.94 · 329.63 Hz |
| Guitar (Drop D) | D2 · A2 · D3 · G3 · B3 · E4 | 73.42 · 110.00 · 146.83 · 196.00 · 246.94 · 329.63 Hz |
| Bass (4-string) | E1 · A1 · D2 · G2 | 41.20 · 55.00 · 73.42 · 98.00 Hz |
| Bass (5-string) | B0 · E1 · A1 · D2 · G2 | 30.87 · 41.20 · 55.00 · 73.42 · 98.00 Hz |
| Ukulele (Standard C) | G4 · C4 · E4 · A4 | 392.00 · 261.63 · 329.63 · 440.00 Hz |
| Violin | G3 · D4 · A4 · E5 | 196.00 · 293.66 · 440.00 · 659.25 Hz |
| Viola | C3 · G3 · D4 · A4 | 130.81 · 196.00 · 293.66 · 440.00 Hz |
| Cello | C2 · G2 · D3 · A3 | 65.41 · 98.00 · 146.83 · 220.00 Hz |
The ukulele preset keeps its re-entrant high G in the listed position, so the fourth string is higher in pitch than the third. The violin preset adds a Bow drone (root, fifth and octave with slow detune) and notch-filters it out of the microphone path so detection keeps working while it sounds.
Individual pages go deeper: guitar, bass, violin, cello, ukulele, mandolin, banjo, double bass and flute.
Cents, A4 and tuning standards
One semitone is 100 cents, so cents = 1200 × log2(f_detected / f_target). A played 442.5 Hz against a 440 Hz target is +9.8 ¢ sharp. Three cents is a frequency difference of about 0.17%, which is why a reading inside ±3 ¢ counts as in tune for performance work.
ISO 16 fixes the A4 reference at 440 Hz with a tuning accuracy of ±0.5 Hz, and that is the default here. Historical and regional pitches differ: Baroque ensembles often use A415, some European orchestras tune to A442 or A443, and A432 has a following of its own. Set the reference before tuning, because every string target moves with it. The A440 vs A432 vs A442 guide covers the conventions.
Accuracy, limits and troubleshooting
- Low strings need a strong signal. Laptop and phone microphones roll off below roughly 80 Hz, so the fundamental of E1 (41.20 Hz) or B0 (30.87 Hz) can be weak. Play firmly and let the attack settle; the decimated detector reconstructs the fundamental from the overtone spacing.
- One note at a time. The detector locks onto a single repetition rate, so a full chord or two ringing strings will not resolve. Mute everything you are not tuning.
- Clarity gates the readout. If the needle stays idle, the input is below the 85% confidence gate. Move away from fans, air conditioning and mains hum, and play close to the microphone.
- System input processing can change the waveform. macOS Voice Isolation and Windows audio enhancements apply noise suppression or gain that can confuse a pitch detector; switch them off for tuning.
- The microphone stream is released when you stop. Audio is processed in browser memory only, and no sample is stored or transmitted.
Related tools
- Chromatic Tuner — free note detection for any single pitch across the full range.
- Guitar Tuner — standard, drop and open tunings with string-by-string targets.
- Violin Tuner — G3, D4, A4 and E5 with a bow-friendly reference tone.
- Tuning Generator: reference pitches and drones for tuning by ear.
Frequently asked questions
How does microphone autocorrelation pitch detection work?
Autocorrelation measures how closely an audio waveform correlates with a time-shifted copy of itself. When the time shift equals the fundamental period of a vibrating musical string or vocal fold, the correlation reaches a sharp peak. By calculating the fundamental period directly in the time domain, the tuner determines the exact fundamental frequency and interpolates sub-sample parabolic peaks to achieve sub-cent tuning resolution.
Why is autocorrelation superior to FFT peak-picking for acoustic instruments?
Acoustic instruments like guitars, cellos, and upright basses produce rich harmonic overtone series where the fundamental frequency is often much weaker in amplitude than the second or third harmonics. An FFT (Fast Fourier Transform) peak-picker often locks onto the loudest harmonic (the octave or fifth), causing erratic octave-jumping. Time-domain autocorrelation (specifically the Normalized Square Difference Function) tracks the underlying periodic repetition of the entire composite waveform, locking solidly onto the true musical fundamental even when the fundamental is acoustically suppressed.
Does this instrument tuner record or upload my audio?
No. All audio acquisition and digital signal processing run strictly inside your browser local memory via the Web Audio API. No microphone data, recordings, audio snippets, or analytical telemetry are ever uploaded or transmitted to any server. When you close the tab or stop the tuner, the microphone stream is immediately released.
How can I tune low bass strings (E1 or B0) reliably with a laptop or phone mic?
Small built-in laptop and phone microphones often roll off frequencies below 80 Hz, making the fundamental of a low E1 (41.2 Hz) or B0 (30.9 Hz) acoustically quiet. Our tuner incorporates a 4096-sample buffer and harmonic pattern correlation to reconstruct the fundamental pitch from overtone intervals. For optimal results, pluck the string firmly over the 12th fret with your thumb, allow the attack transient to settle for a half-second, and mute all idle strings with your palm.
What are cents in musical tuning?
In 12-Tone Equal Temperament (12-TET), an octave is divided into 12 semitones, and each semitone is divided into 100 cents. A single cent represents a frequency ratio of approximately 1.000578. Human ears generally cannot distinguish pitch variations smaller than 3 to 5 cents in melody, which is why a reading within ±3 cents is considered in tune for performance.