Pitch Detector

Identify the musical pitch of any sound in real time. See the note name, octave, cents accuracy, and pitch stability β€” displayed on an interactive piano keyboard. Play reference tones, set a target note to aim for, and track your vocal range. 100% browser-based, no downloads, no data uploaded.

Pitch Detector Tool

πŸ”’ 100% private β€” all pitch detection runs locally in your browser. No audio is ever uploaded or stored.
Chrome Firefox Safari Edge
⏸ HELD
Space Start/Stop H Hold R Restart T Ref Tone C Calibrate
🎀 Microphone:
Click "Start Listening" to begin
β€”
β€” Hz
WAITING
Pitch Accuracy
βˆ’50Β’ Flat In Tune +50Β’ Sharp
Cents Offset
β€” Β’
Volume
β€” dB
Pitch Stability
β€”%
Detection Confidence
0%
πŸ”Š Reference
Sensitivity -45 dB
Tuning (A4)
Response
Notation
🎯 Target Note
🎯 HIT!
Hits: 0
πŸ”₯ Current Streak β€”
πŸ† Best Streak β€”
🎹 Piano Keyboard C2–B6 Β· click a key to hear the note
Pitch Timeline
🌊 Waveform
Vocal Range & Voice Type
β€” β€”
Voice Type: β€”
Session Stats
Readings
0
In Tune
β€”%
Most Common
β€”
Duration
0:00
History Log
Time Note Hz Cents dB

How to Use the Pitch Detector

  1. Start Listening

    Click "Start Listening", select your microphone, and grant permission. Choose your preferred input device β€” headset mic, built-in mic, or "Stereo Mix" to analyze audio playing on your computer. All processing happens 100% locally in your browser.

  2. Sing, Play, or Hum

    Produce a sound β€” sing a note, play an instrument, hum, or whistle. The tool works best with single sustained notes. For chords or complex audio, use the Frequency Detector which separates multiple frequencies.

  3. Read Note & Accuracy

    The large note display shows the detected note and octave (e.g., A4, C5). The accuracy badge tells you "IN TUNE", "SHARP", or "FLAT". The pitch bar needle shows exactly how far off you are in cents. The corresponding piano key glows green when in tune.

  4. Use the Piano & Reference Tone

    Click any piano key to hear that note through your speakers as a reference tone. Use this to compare your pitch against the correct note. Set a target note to aim for β€” the tool shows "HIT!" when you nail it within Β±10 cents.

  5. Track Your Performance

    Watch the pitch timeline for your accuracy over time. Check pitch stability (0–100%), note streak (consecutive same-note readings), vocal range (lowest to highest note), and session stats. Export data as CSV or copy the current reading.

Understanding Your Results

Note Display & Accuracy Badge

The giant note display shows the nearest musical note to the detected frequency. The accuracy badge provides an instant status: "βœ“ IN TUNE" (within Β±5Β’, green), "↑ SLIGHTLY SHARP" / "↓ SLIGHTLY FLAT" (within Β±20Β’, yellow), or "↑ SHARP" / "↓ FLAT" (beyond Β±20Β’, red). One cent is 1/100th of a semitone.

Interactive Piano Keyboard

The 5-octave piano (C2–B6) provides a visual reference for the detected note, covering the full vocal range from bass to soprano. The active key glows green when in tune or yellow when off-pitch. Click any key to play that note through your speakers as a sine-wave reference tone β€” perfect for ear training and pitch matching. The target note (if set) is highlighted with a cyan border and 🎯 icon.

Pitch Accuracy Bar

The horizontal bar shows the cents offset visually. The green zone in the center marks the Β±10Β’ "in tune" region. The needle moves left for flat and right for sharp. This gives you instant visual feedback on which direction to adjust.

Reference Tone & Target Note

The reference tone button plays a sine wave at the detected (or target) frequency through your speakers. Use this to hear exactly what "in tune" sounds like. Target Note mode locks the pitch bar to a specific note β€” select "A4", "C5", or any note from the dropdown. The tool shows "🎯 HIT!" when your pitch is within Β±10Β’ of the target, and a dashed cyan line appears on the timeline.

Waveform Oscilloscope

The waveform display shows the raw audio signal from your microphone in real time. A clean sine-like wave indicates a pure tone; complex shapes indicate harmonics or noise. This helps you visually assess the quality and consistency of your sound.

Pitch Stability Score

Stability measures how consistently you hold a pitch over the last 30 readings. 100% = perfectly steady. The score is based on the standard deviation of your cents offsets. 80%+ is excellent, 60–80% shows natural vibrato, below 40% indicates significant pitch drift. Professional singers typically maintain 70–90% with intentional vibrato.

Note Streak, Vocal Range & Voice Type

The note streak tracks consecutive readings of the same note β€” a fun challenge to hold steady. The vocal range tracker records the lowest and highest notes detected during your session, calculating your range in octaves. The voice type identifier automatically classifies your voice as Bass, Baritone, Tenor, Alto, Mezzo-Soprano, or Soprano based on your measured range. Sing from your lowest comfortable note to your highest to get an accurate classification.

Sharps & Flats Toggle

Musicians who prefer flat notation (Dβ™­ instead of Cβ™―) can click the β™―/β™­ toggle to switch. This updates the note display, piano keyboard labels, target note dropdown, and all history entries.

YIN Confidence Score

The Detection Confidence bar shows how certain the YIN algorithm is about the detected pitch. It reflects the cumulative mean normalized difference (CMND) score β€” the closer the bar is to full, the stronger and cleaner the detected pitch. A low confidence reading (pale bar) means the sound is noisy, too quiet, or inharmonic. Confident readings (bright full bar) are reliable; use the Sensitivity slider or Calibrate button to improve low-confidence results in noisy rooms.

Auto-Calibrate Noise Floor

The Calibrate button (or press C) measures your room's background noise while you stay silent for 1.5 seconds, then automatically sets the Sensitivity threshold to 6 dB above the 90th-percentile noise level. This prevents false readings from ambient noise without cutting off quiet voices or soft instruments. Run a calibration any time the environment changes β€” moving to a louder room, turning on a fan, or switching microphones.

Session Summary Card

When you stop the detector, a Session Summary card appears showing your peak note, session duration, total hits (if a target note was set), and highest pitch stability score. This gives you a quick snapshot of your practice session without needing to scroll through the history. Start a new session with the Restart button (or press R) to reset all counters and begin fresh.

Keyboard Shortcuts

All major controls have keyboard shortcuts for hands-free use: Space β€” Start / Stop recording. H β€” Hold / Resume the pitch display. R β€” Restart (clear session data and begin fresh). T β€” Toggle the reference tone on / off. C β€” Auto-calibrate the noise floor (stay silent during the 1.5 s measurement). Shortcuts are disabled while typing in any input field.

How Pitch Detection Works

The YIN Algorithm

This tool uses the YIN algorithm β€” an improved version of autocorrelation specifically designed for pitch estimation. YIN computes a difference function, applies cumulative mean normalization, and uses an absolute threshold (0.15) with parabolic interpolation for sub-sample accuracy. This makes it significantly more reliable than raw autocorrelation at avoiding octave errors.

From Frequency to Note

Once the fundamental frequency is found: semitones = 12 Γ— logβ‚‚(freq / A4). The integer part gives the note name, the fractional remainder gives cents offset. All calculations respect the configurable tuning standard (400–480 Hz).

Response Modes

Fast β€” no smoothing, every frame shown. Best for rapid passages. Normal β€” weighted average of last 3 frames. Balanced. Smooth β€” weighted average of last 8 frames. Best for sustained notes and the most stable reading possible.

Reference Tone Generation

Reference tones are generated using the Web Audio API's OscillatorNode, producing a pure sine wave at the mathematically exact frequency. The oscillator runs in a separate AudioContext so it does not interfere with pitch detection. Volume is adjustable via the slider.

Voice Type Reference Guide

Sing from your lowest comfortable note to your highest, then check the Voice Type display. The tool automatically classifies your range using standard vocal fach boundaries.

Soprano
C4 – C6
Highest female voice. Examples: opera leads, pop high belters.
Mezzo-Soprano
A3 – A5
Middle female voice. Rich, warm tone. Most common female voice type.
Alto / Contralto
F3 – F5
Lowest female voice. Deep, powerful tone. Rare and distinctive.
Tenor
C3 – C5
Highest common male voice. Lead roles in opera and musical theatre.
Baritone
G2 – G4
Middle male voice. Most common male type. Versatile range.
Bass
E2 – E4
Lowest male voice. Deep, resonant tone. Rare in pure form.

Tip: For the most accurate classification, sing your full range in one session β€” start at your lowest note and work up chromatically. The voice type identifier needs at least 5 semitones of range to classify.

How to Test Your Vocal Range

  1. Warm Up First

    Do 5 minutes of gentle vocal warm-ups before testing. Cold voice muscles give inaccurate results. Hum softly, do lip trills, and sing scales at comfortable volume.

  2. Find Your Lowest Note

    Start speaking low, then sing lower. Go down slowly β€” one semitone at a time. Stop when the note becomes strained or loses clarity. That's your chest voice floor.

  3. Find Your Highest Note

    Sing up through your passaggio (break) into head voice or falsetto. The tool counts all registers. Go as high as you can produce a clean tone β€” the piano keyboard glows to confirm detection.

  4. Read the Range & Voice Type

    Check the Vocal Range tracker β€” it shows your lowest note, highest note, and total span in octaves. The Voice Type display automatically classifies your voice based on the measured range.

Using as a Chromatic Instrument Tuner

The Pitch Detector works as a full chromatic tuner for any instrument. Here's how to get the best results:

Guitar & Bass

Pluck each string individually and watch the note display. Use Fast response mode for quicker needle response. The pitch bar needle shows exactly how sharp or flat you are β€” tune until it's centered at 0Β’. Standard tuning: E2, A2, D3, G3, B3, E4 (guitar) or E1, A1, D2, G2 (bass).

Ukulele

Standard GCEA tuning: G4, C4, E4, A4. Use Normal response mode. The 5-octave piano keyboard shows these notes directly.

Wind & Brass

Long-tone practice works best. Set Target Note to the note you're working on, then blow. The "HIT!" badge confirms you're within Β±10Β’. Use Smooth mode for sustained notes.

Violin & Strings

Open string tuning: G3, D4, A4, E5. Bow each string slowly. The Pitch Stability meter shows how consistently you sustain the pitch β€” aim for 80%+.

Adjusting Tuning Standard

Some orchestras use A4 = 442 Hz (European) or 443 Hz. Some musicians prefer A4 = 432 Hz. Enter your desired value in the Tuning (A4) field β€” all note calculations update instantly.

Frequently Asked Questions

What's the difference between the Pitch Detector and Frequency Detector?

The Pitch Detector is designed for musicians β€” it shows the musical note name, octave, cents accuracy, interactive piano, reference tone, pitch stability, and vocal range. The Frequency Detector is more technical β€” it shows raw Hz, separates multiple frequencies, and displays waveform + spectrum. Use the Pitch Detector for tuning and singing; use the Frequency Detector for analysis.

How accurate is the pitch detection?

The YIN algorithm with parabolic interpolation achieves Β±1–2 cents accuracy for clear, sustained tones. For best results, use a close microphone in a quiet environment and adjust the Sensitivity slider to suppress ambient noise.

Can I use this to check if I'm singing in tune?

Yes! Sing a note and watch the accuracy badge β€” "IN TUNE" means you're within Β±5 cents. Use the target note feature to pick a specific note and aim for it. Click a piano key to hear the reference tone and match your pitch against it. The note streak adds a gamification challenge β€” hold the same note for as long as possible!

How do I use the reference tone?

Click "Play Reference" to hear a sine wave at the detected note (or target note). You can also click any piano key to play that specific note. Adjust the volume with the slider. This is perfect for ear training β€” listen to the reference, then try to match the pitch with your voice or instrument. Use headphones to prevent feedback.

What is Target Note mode?

Target Note mode lets you select a specific note to aim for (e.g., A4, C5, G3). When active, the target note is highlighted on the piano with a 🎯 icon, and a dashed cyan line appears on the pitch timeline. When your pitch is within ±10 cents of the target, a green "🎯 HIT!" badge appears. This is ideal for vocal exercises and focused practice.

What does Pitch Stability measure?

Stability measures how consistently you hold a pitch over 30 readings. 100% = zero variation. 80%+ = excellent. 60–80% = good with natural vibrato. Below 40% = significant pitch drift. The score is based on standard deviation of cents offsets.

Can I switch between sharps and flats?

Yes! Click the "β™― Sharps" toggle button to switch to flat notation (Cβ™― becomes Dβ™­, etc.). This updates the note display, piano labels, target note dropdown, and all history entries. Click again to switch back to sharps.

What notes can this detect?

Approximately C1 (32.7 Hz) to C8 (4186 Hz) β€” the full piano range and beyond. The piano keyboard shows C3–B5, but detection works across the entire range. For very low bass notes, use "Smooth" response mode for better accuracy.

Can I change the tuning standard?

Yes! The Tuning (A4) input accepts any frequency between 400–480 Hz. Standard is 440 Hz. Popular alternatives: 432 Hz (alternative tuning), 442 Hz (European orchestras). All note calculations update instantly.

Does this work with instruments?

Absolutely! Works with any pitched sound β€” voice, guitar, piano, violin, flute, trumpet. Play single notes for best results. For chords or polyphonic audio, use the Frequency Detector which separates multiple frequencies.

Is my audio data private?

Your audio is 100% private. All pitch detection happens entirely in your browser using the Web Audio API. No audio is recorded, stored, or transmitted. The tool works completely offline once loaded.

How do I find out my voice type β€” soprano, alto, tenor, bass?

Start the detector, warm up your voice, then sing from your lowest comfortable note to your highest. The Voice Type display automatically classifies you as Bass, Baritone, Tenor, Alto, Mezzo-Soprano, or Soprano based on your measured range. The classification uses standard vocal fach boundaries: Bass (E2–E4), Baritone (G2–G4), Tenor (C3–C5), Alto (F3–F5), Mezzo (A3–A5), Soprano (C4–C6). Sing at least 5 semitones of range for a reading to appear.

Can I use this as a guitar or ukulele tuner?

Yes! The Pitch Detector works as a full chromatic tuner for any pitched instrument. Pluck a string and watch the note display and pitch bar β€” tune until the needle centers at 0Β’. Use Fast response mode for quicker needle reaction. Standard guitar: E2 A2 D3 G3 B3 E4. Standard ukulele: G4 C4 E4 A4. Use the Target Note feature to lock onto each string's expected note for easier tuning. The 5-octave piano (C2–B6) covers all standard instrument ranges.

Why is the YIN algorithm better than autocorrelation?

Standard autocorrelation tends to produce octave errors β€” detecting the note one or two octaves away from the true pitch. YIN (by de CheveignΓ© & Kawahara, 2002) applies cumulative mean normalized difference (CMND) to suppress false peaks, then uses parabolic interpolation for sub-sample accuracy. The result is significantly fewer octave jumps and Β±1–2Β’ accuracy for clear tones. The Detection Confidence bar shows the YIN CMND score β€” higher is better.

What do the Fast, Normal, and Smooth response modes do?

Fast β€” no smoothing, every detection frame is shown directly. Best for rapid passages or quick tuning checks. Normal β€” weighted average of the last 3 frames. Balanced between responsiveness and stability. Smooth β€” weighted average of the last 8 frames. Best for sustained notes, singing evaluation, and the most stable reading. A large pitch jump (over 150 cents) automatically resets the smoothing buffer so fast leaps are shown correctly even in Smooth mode.

What are the keyboard shortcuts?

Press Space to start or stop. H to hold/resume the display. R to restart a new session. T to toggle the reference tone. C to auto-calibrate the noise floor (stay quiet for 1.5 seconds). Shortcuts are disabled when typing in input fields.

What is the Calibrate button for?

The Calibrate button measures your room's ambient noise for 1.5 seconds and automatically sets the sensitivity threshold to 6 dB above the 90th-percentile noise level. This filters out background noise without cutting off quiet voices or instruments. Click Calibrate (or press C) while the tool is running, stay silent, and let it sample the room. The Sensitivity slider updates automatically.

How does the Target Note hit counter work?

Select a target note from the dropdown. Each time your pitch enters the Β±10Β’ zone of the target note, a hit is counted. The "HIT!" badge flashes and the hit counter increments. A continuous sustained pitch counts as one hit β€” the counter only increments on the transition into the target zone, not on every frame. This makes it a genuine measure of how many times you successfully "landed" the note during practice.