How key detection works, and why it sometimes gets it wrong
A key finder doesn't listen to a song; it counts frequencies. That's why it gets most tracks right, but goes wrong in predictable ways on some genres and some tracks. Knowing when to be suspicious tells you how far to trust your tags.
Updated: October 2026
01Step by step: from sound to key
- Spectrum: the audio is cut into short frames, and the strength of each frequency is measured in every frame.
- Chroma (pitch-class profile): frequencies are folded into the 12 notes, regardless of octave. The result is a 12-number fingerprint of how much each note sounds across the track.
- Profile matching: the fingerprint is compared with reference profiles for each of the 24 keys. The closest match wins.
CrateKeys runs a published variant of this method with our own code in your browser; the file never goes to a server.
02The most common mistake: a neighbouring key
8A and 9A share six of their seven notes. If a track rarely uses the one note that differs, the two fingerprints are almost identical and the software may pick the neighbour. The good news: the neighbouring key is compatible anyway. The mistake doesn't break a set; it only misleads you about the energy direction.
03Minor or major? (8A ↔ 8B)
A minor and C major use the same seven notes. The difference is which note feels like "home". If the bassline is vague or the track swings between two chords, the software may return the other letter of the same number. That's harmless harmonically, but it misleads you about the track's character (dark or bright).
04Why does software get it completely wrong?
- Tracks without a clear key: tracks made of drums and effects with no melody have few notes to count.
- Key changes: pop songs that modulate up in the last chorus, or two-part recordings, don't fit a single key; the software picks the dominant one.
- Off-tune recordings: old vinyl rips or pitched edits can fall between two keys.
- Modal and non-Western scales: Dorian, Phrygian or maqam-based music doesn't match standard major/minor profiles exactly.
05Checking the result by ear
While the doubtful track plays, open its key page and press Play chord. If the tonic chord sits with the track, the key is right. If it rubs, try the neighbouring and relative keys; the right answer is usually one step away.
A second method is to look at the bass note: the most repeated bass note of a track is usually the tonic. The bass frequencies on our key pages make that note easy to find on a spectrum analyser.
06How much should you trust tags?
No software is right on every track, so still rehearse a key-based set by listening. A practical approach: batch-analyse your library, then check by ear only the tracks you're suspicious of (no clear key, key changes or very old recordings) before you play them. It's much faster than listening to every track and the result is nearly the same.