Methodology: How PitchDetector Works

PitchDetector.com’s 34 tools analyse sound in your browser: they estimate the fundamental frequency (or the key, chords or tempo), convert it to musical terms and show how sure they are. Before release each tool is tested with generated audio whose true answer is known. Our pitch engine read 484 of 488 test tones within ±3 cents. This page gives the method, the numbers, the test conditions and the limits.

We treat every result as a measurement with an error, not as a certainty. Below you will find how the tools work, what we measured, how we measured it and what those tests do not prove. Version history is in the changelog.

Test Results at a Glance

Tests run on 2026-09-26 for the current versions (see the changelog). 1,184 automated browser checks across the 34 tools passed, 0 failed.
ToolTest audioResult
Pitch Detector (engine shared by the singing and note tools)Steady tones C2–C7: sine, voice-like, sawtooth, missing fundamental; 44.1 and 48 kHz484 of 488 within ±3 cents, all within ±5; with noise (≈11 dB SNR) 44 of 46 within ±5; silence and white noise give no reading; 0.4 ms per frame
Instrument Tuner, Chromatic TunerBass B0 (30.87 Hz) to B7 (3,951 Hz), weak fundamentals, bowed tones, noise at ≈23 dB SNREvery test file within 0.1 cent offline; 0.00 cent spread over 2 s on steady tones; needle steady over 120 readings (2 s) on E2
Guitar, ukulele and violin tunersPlucked and bowed test tones incl. Drop C with a −20 dB fundamental and 7-string low BRight string and note, ±0 cents on in-tune strings; reference tones re-measured at under 0.1 cent error
Song Key Finder185 synthesised tracks in all 24 keys (progressions, melodies, pop loops with drums, detuned audio)Exact key in 172 (93%); misses were loops starting on the relative major; tuning offsets of −32 to +45 cents measured within 1 cent
Chord Progression Finder15 synthesised songs (piano, guitar, drums; diminished and augmented chords)98.3% of 50 ms frames right (root + major/minor); 15 of 15 progressions right; noise and drums alone give no chords
BPM Detector45 steady tracks (click tracks and drum loops from 60 to 178 BPM, drift and jitter, a waltz, a quiet ballad) plus a tempo change44 of 45 within ±1 BPM in the right octave; the miss was a 78 BPM house loop read as 156
Pitch to MIDI Converter5 melodies: organ scale, sung melody with vibrato and scoops, staccato, rests, fast whistled notes57 of 57 notes right (100% precision and recall); mean onset error 5.4 ms; tempo within 1 BPM for all five; exported files re-read with an independent MIDI parser
Pitch ShifterStereo test tones through every preset (±12, +3, −5 semitones, +50 cents, 432 Hz, nightcore)Output frequency within 0.01% of the target (measured by FFT on the downloaded WAV); length unchanged in keep-speed mode
Online MetronomeClicks rendered offline and live playback recorded on the audio clockEvery click found; at 137.3 BPM in 16ths the largest interval error was 0.025 ms
Tempo TapperTap timestamps with human jitter, extra taps and a missed beat95.00 BPM on a 95 BPM run with a missed beat, where a plain average of tap gaps gives 87.8
Frequency to Note and Note to Frequency convertersEvery answer checkedMatch the equal-temperament formula
Frequency DetectorPure 100, 1,000, 5,000 and 12,000 Hz tones and a voice-like 440 Hz toneExact reading for every tone; the voice-like tone read as its 440 Hz fundamental, not its louder harmonics; white noise gives no false frequency

How We Test

  • Known answers: test audio is generated by script (tones, sung-like notes with vibrato and breath noise, chord songs, drum loops, MIDI-style melodies), so the correct note, key, chord or tempo is known exactly.
  • Engine tests: the same code that runs on the page is run offline in Node.js over the whole test set, and every result is compared with the truth.
  • Browser tests: each tool is installed on a clean WordPress (WordPress Playground, PHP 8.2, Astra theme, Yoast SEO) and driven in Microsoft Edge by an automated script. A fake microphone plays the test files into the page, and the script presses the real buttons and reads the result off the screen.
  • Page checks: one H1, the tool name as an H2, no page overflow on a 390 px phone, 44 px touch targets, clear messages when the microphone is blocked, and structured data with 0 errors and 0 warnings on validator.schema.org.
  • Release rule: a tool ships only when every check passes. When the engine changes, the tests run again and the new version is listed in the changelog.

How the Pitch Engine Works

The pitch detector and the singing, note and tuner tools share one engine:

  1. Input: the microphone opens only after you press Start. Echo cancellation, noise suppression and automatic gain control are switched off, because these call filters distort sustained notes.
  2. Window: 4,096 samples (about 85 ms at 48 kHz; 8,192 above 60 kHz), long enough for two cycles of the lowest piano note.
  3. Estimate: the McLeod pitch method, a normalised autocorrelation computed with an FFT, with key-maximum picking, parabolic interpolation and a clarity threshold of 0.6. How it compares with other methods: autocorrelation vs YIN; the pipeline in plain language: real-time browser pitch detection explained.
  4. Stability: a noise gate set from a 0.7 s measurement of the room, a 5-frame median and an octave guard that holds back single-frame jumps of 12 semitones.
  5. Note and cents: n = 69 + 12 × log₂(f ÷ A4), with A4 = 440 Hz unless you choose another reference; the offset is shown in cents (100 per semitone).

How the Other Tools Work

  • Tuners use the same engine plus string detection for the chosen instrument and tuning, an octave guard for low strings and a low-note mode down to B0.
  • Song Key Finder measures how much each of the 12 pitch classes sounds and compares that profile with all 24 keys, using an ensemble of the Krumhansl–Kessler, Temperley and Albrecht–Shanahan key profiles.
  • Chord Progression Finder builds a chromagram every 46 ms, compares each slice with 120 chord templates (12 roots × 10 types) and finds the most likely sequence with a hidden Markov model (Viterbi).
  • BPM Detector splits the audio into four frequency bands, builds an onset curve, finds the beat period by autocorrelation, checks half and double time and tracks the beats.
  • Pitch Shifter uses a stereo-linked phase vocoder with phase locking and a windowed-sinc resampler; the WAV keeps the file’s original sample rate.
  • Online Metronome schedules every click ahead of time on the audio clock rather than with JavaScript timers, which is why it stays sample-accurate.

Voices and Instruments Behave Differently

A singing voice brings vibrato, breath noise, changing vowels and slides between notes, so the voice tools report steadiness and only lock a note once it is held. Instruments differ too: a flute is close to a pure tone, a low guitar or bass string can have a weaker fundamental than its harmonics, and a bowed violin changes slightly with bow pressure. That is why each tuner is tested with tones shaped like its instrument, and why a general detector and a dedicated tuner can show slightly different behaviour on the same sound.

Harmonics, Octave Errors and Confidence

Musical sounds contain harmonics at whole-number multiples of the fundamental: a note at 220 Hz also has energy at 440, 660 and 880 Hz. If a detector gives too much weight to one of them, it reports the wrong octave; if it favours a subharmonic, the reading drops an octave. Our octave guard and the McLeod peak picking reduce these errors, and the missing-fundamental and weak-fundamental cases are part of our test set, but no single-note detector removes them in every situation.

Where a tool shows clarity or confidence, it describes how strongly the current sound supports the chosen answer. It is not a percentage of accuracy, and a confident reading can still be affected by a poor microphone or a different tuning reference.

What Our Tests Do Not Prove

  • Synthetic audio is not a real room. Our test files are generated, and the fake microphone skips your real microphone, its placement and your operating system’s audio processing. Real results are usually a little less precise.
  • One note at a time. The pitch tools are built for single notes. Chords, backing tracks and several voices have no single pitch.
  • High notes. Above about 1,800 Hz the pitch engine’s accuracy is ±5 cents rather than ±3.
  • Devices vary. Slow phones, Bluetooth microphones and hidden tabs add delay or skip frames.
  • Not laboratory equipment. For calibration, acoustics research or medical voice assessment, use dedicated measurement hardware and qualified professionals.

Privacy: Analysis Stays in Your Browser

All audio analysis on the tools listed here runs in your browser. Microphone audio and the files you open are processed in your device’s memory and are not uploaded to our server; settings such as your A4 reference are kept in your browser’s local storage. Details are on our data security page.

Corrections and Updates

If a result or a statement on this page looks wrong, email support@pitchdetector.com with the page, your device and browser, and what you played or sang, or use the contact page. For common microphone problems, start with troubleshooting. Who writes and reviews our content is described on About us.

Further reading: the original YIN paper and the MDN Web Audio API documentation.

Last reviewed: September 26, 2026.

Scroll to Top