Key Detector
An estimate of the key, with an honest confidence figure and the closest alternatives.
MP3, WAV, M4A, FLAC, OGG, Opus and most other audio. Any length.. Files stay on your device.
How it works
- Choose an audio file.
- Wait for the analysis to finish.
- Read the key, the Camelot code and the confidence.
How the key is estimated
The audio is reduced to a chromagram: how much energy falls on each of the 12 pitch classes (C, C sharp, D and so on) over the whole file, after estimating and correcting for a recording that is slightly out of tune. That pattern is compared with typical major and minor key profiles from published research (Krumhansl-Kessler, Temperley and EDMA, the last tuned on electronic dance music). The key with the best average match wins.
The three closest keys are listed with their match scores, together with each method's own best guess, so you can see when the methods disagree.
Camelot codes and relative keys
DJs use the Camelot wheel to find tracks that mix harmonically. Minor keys are A (A minor is 8A) and major keys are B (C major is 8B). Keys one step apart on the wheel, or the same number with the other letter, usually blend well. The relative major or minor shares the same notes and key signature, so it is shown next to the result.
Limits of the estimate
The tool assumes one key for the whole file. A song that modulates, or one that sits between a major and its relative minor, will give a lower confidence, and the runner-up in the list is often the answer you want. Drums-only, speech and heavily atonal sound have no key to find and may give a low-confidence result or none. Treat the answer as a good first guess and check it against your ear or instrument.
Questions
Why is the result a relative key (C major instead of A minor)?
The two share the same notes. Which one feels like home depends on where the music rests, which a whole-file average only sees indirectly. Check the closest keys list.
What does the confidence figure mean?
It combines how well the winning key fits and how far ahead of the runner-up it is. It is a heuristic, not a probability: high means a clear match, low means treat the answer with caution.
Does a detuned recording matter?
Not much. The tool estimates how far the recording is from A = 440 Hz and corrects for it. The amount is shown when it is noticeable.
Can it find the key of a long mix or a podcast?
Yes, the analysis streams through the file. Remember that a DJ mix has many keys; only one average key is reported.
Are my files uploaded?
No. Everything is analysed in your browser.