How accurate is our key finder?
We ran the finder on 80 clips with known keys and scored it the same way academic key-detection benchmarks do. It named the exact key 65% of the time. Tunebat's free mode got 58% on the same files. Test run on 24 November 2026.
Results
| Clips | bpmkeys exact | bpmkeys MIREX | Tunebat free exact | Tunebat free MIREX |
|---|---|---|---|---|
| Electronic (40) | 60% | 67% | 55% | 61% |
| Pop, rock and other (40) | 70% | 80% | 60% | 70% |
| All 80 | 65% | 74% | 58% | 65% |
The scores are for the version that runs on this site, in your browser. A classic template-matching method (Krumhansl–Kessler key profiles) scored 46% exact on the same clips, which gives a sense of how hard the set is.
What the numbers mean
- Exact counts only the right tonic and the right mode. C minor for a song in C minor.
- MIREX is the weighted score used by the MIREX key-detection contest. A near miss gets partial credit: a fifth away scores 0.5, the relative major or minor 0.3, the parallel key 0.2, anything else 0.
- Most misses were near misses. Of the 28 wrong answers, 16 were a fifth away or the relative key, which share all or nearly all of their notes with the right key. In a DJ set those keys still mix.
- With 80 clips the margin of error is about ±10 points at 95% confidence. Our lead over Tunebat's free mode is 6 clips, which is inside that margin. Read it as "at least as good", not "clearly better".
How the confidence label helps
The finder labels each answer by how sure the model is. On this test, 54% of clips got a high confidence label, and those were exactly right 84% of the time. When confidence is lower, the finder shows a second guess; the right key was one of the two shown for 80% of all clips. These two figures come from the full-precision reference run, which matches the browser version on 79 of 80 clips.
The test set
- 40 electronic clips from the GiantSteps Key dataset, a public research set of two-minute electronic dance music previews whose keys were labelled by hand.
- 40 pop, rock, hip-hop and other clips: 30-second previews of well-known songs, labelled with the key and tempo most commonly published for each song.
Every tool received the same audio files. Tunebat was tested in its free mode, uploading each file and recording the key it reported.
Tempo
On 39 of the pop clips with a known tempo, the BPM was within 4% of the reference for 34 (87%). Another 3 came out at half, double or 3:2 of the reference, which the ÷2 and ×2 buttons fix. One solo piano piece had no steady beat and got no reading; for music like that, use tap tempo.
Limits of this test
- The clips are short previews, not full songs. On a full track the finder reads the middle two minutes, which usually helps.
- Some pop songs don't have one agreed key. Songs that sit between a major key and its relative minor (Hotel California, Wonderwall) are scored against one published label, so a defensible answer can count as wrong.
- One pop clip was dropped before scoring because the preview turned out to be a different song from the label. The pop group was topped up to 40 with a replacement.
- 80 clips is a small test. We will rerun it on a larger set and update this page.
The model behind it
Key detection uses MusicalKeyCNN, an open-source convolutional network (MIT licence) based on the design by Korzeniowski and Widmer (2018). It reads a constant-Q spectrogram of the audio and outputs a score for each of the 24 keys. We run it in your browser with weights stored at half precision to keep the download under 1 MB; the half-precision version changed one answer out of 80 compared with the original. Tempo uses the open-source music-tempo library.
Reproduce it
- Download the GiantSteps Key dataset and collect 30-second previews for a list of songs with known keys.
- Drop the files into the BPM and key finder and use Download CSV to save the results.
- Score each answer as exact, fifth, relative, parallel or other, and average the MIREX weights. Run the same files through any other tool you want to compare.
Found a song where the finder is wrong? Tell us. Wrong answers are how the next test set gets built.