Key Detector
Free online key and pitch detector. Detect musical key, pitch, and notes from audio files. Real-time pitch detection with piano visualization. Perfect for musicians and music producers.
About Key & Pitch Detector
This online key and pitch detector analyzes your audio files to identify the musical key and pitch. It uses advanced pitch detection algorithms (YIN) and key detection based on Krumhansl-Schmuckler key-finding algorithm. Perfect for musicians, DJs, music producers, and anyone working with music.
What audio formats are supported?
All common audio formats are supported including MP3, WAV, OGG, AAC, M4A, FLAC, OPUS, and more.
What is musical key?
Musical key is the group of pitches (scale) that forms the basis of a music composition. For example, 'C Major' means the song primarily uses notes from the C major scale (C, D, E, F, G, A, B). Knowing the key helps musicians play along, transpose, or understand the harmonic structure.
What is pitch?
Pitch is the perceived frequency of a sound. It's measured in Hertz (Hz). For example, the note A4 (middle A) has a frequency of 440 Hz. Higher frequencies produce higher pitches, lower frequencies produce lower pitches.
What are cents?
Cents are a unit of measurement for musical intervals. One semitone (the distance between adjacent piano keys) equals 100 cents. The cents value shows how sharp (+) or flat (-) the detected pitch is from the nearest note. ±5 cents is generally considered in tune, ±20 cents is noticeably out of tune.
How accurate is the key detection?
Key detection accuracy depends on the music type. It works best for: tonal music with clear harmony (pop, rock, classical), songs that stay in one key, and music with sufficient note variety. It may be less accurate for: atonal music, very short clips, music with frequent key changes, or heavily distorted audio.
What is real-time pitch detection?
Real-time pitch detection analyzes the audio as it plays, showing the current pitch and note at each moment. This is useful for: analyzing vocal performances, checking instrument tuning, understanding melody lines, or finding the pitch of specific sections. The pitch meter shows if you're sharp (+) or flat (-).
What does the piano visualization show?
The piano visualization highlights the detected notes on a piano keyboard. This provides a visual reference for the pitch and helps you understand which key is being played. Active keys are highlighted in blue (white keys) or yellow (black keys).
What are scale notes?
Scale notes are the specific notes that belong to the detected key. For example, C Major contains: C, D, E, F, G, A, B. A Minor contains: A, B, C, D, E, F, G. These are the notes that will sound 'in key' when played with the music.
Can I use this as a tuner?
Yes! The real-time pitch detection feature works great as a tuner. Play your instrument or sing, and the tool will show the note and cents deviation. The pitch meter shows if you're sharp (right of center) or flat (left of center). Aim for 0 cents for perfect tuning.
What if the key detection is wrong?
Key detection uses statistical analysis of the pitch content. If it's wrong, possible reasons: 1) The song modulates (changes key), 2) Very short audio clip, 3) Non-tonal music, 4) Heavy distortion or noise. Try analyzing a longer section or a clearer recording. The confidence percentage indicates reliability.
Can I detect key from vocals only?
Yes, though it works better with full musical arrangements. Vocals alone may have less harmonic information. For best results with vocals, choose sections where the singer holds notes clearly, or sections with multiple voices/harmonies.
Is my audio file safe?
Absolutely! All audio analysis happens directly in your browser using Web Audio API. Your audio file is never uploaded to any server. Everything stays private on your device.