How HomeNote finds the key, and how we tested it.
Two parts. First, what HomeNote does with your audio, stage by stage, shown on a real song. Second, the test behind the accuracy chart: songs HomeNote had never heard, labelled by people who had nothing to do with HomeNote, with every tool run the same way on the same computer, and every answer published.
How HomeNote listens
Five stages run continuously while the track plays. Every picture below is real output from the plugin's analysis code, run on one of the 684 test songs: “The Discovery” by BrokeMC, a hip-hop track the experts label F minor (CC BY 3.0 US, from the Free Music Archive). HomeNote's answer for it is F minor.
Measure the tuning
The audio is mixed to mono at 22.05 kHz. An 8,192-point FFT (2.7 Hz per bin) finds the spectral peaks in each frame and groups them into fundamentals. Every fundamental between 70 and 2,300 Hz votes for how far it sits from the nearest note of the A = 440 grid, in half-cent bins. The peak of that histogram is the track's tuning. For this song it is -4.5 cents, so A = 438.9 Hz.
Turn the drums down
A constant-Q transform measures 252 pitch bins, 36 per octave from C1 up, every 46 ms. Each bin is then compared with its neighbours two ways: a median across 13 frames in time (about 0.6 s) keeps what is held, and a median across 37 bins in pitch (about an octave) keeps what is a broadband hit. Bins that look like hits are turned down to as little as 15%, never to zero. Drag across the picture to compare. In these twelve seconds the weighting removes 44% of the spectrum's magnitude.
Fold into twelve notes
The cleaned spectrum is folded octave over octave into the twelve note names, shifted by the tuning from step 1 so each bin lands on the right note. A second copy keeps only the low register, for the bass. Real music is never as clean as a textbook diagram: every note has some energy, and the key shows up as seven notes standing above the other five.
Two readers score all 24 keys
Three small convolutional networks read the cleaned spectrum directly, in 186 ms steps, and their probabilities are averaged. Separately, a profile reader scores the twelve-note picture, the bass notes and the chord sequence against learned key profiles. The two are blended in the log domain, 70% networks and 30% profiles. Here both readers agree, and the blend gives F minor 80%.
Show a key only when it's sure
A calibrated model turns the blend into the chance that the notes are right, counting the key and its relative together because Auto-Tune corrects both the same way. The plugin shows the key only above 80%. This is the live reading for the whole song, checked once a second: it first clears the bar at 15 seconds, falls back under it two seconds later, clears it again at 29 seconds and stays there, settling near 91%. The key was on screen for 91% of the song. Move the pointer along the line, or tap it, to read any second.
Results
Two ways to count the same 684 songs. On the left, a song counts when the tool's main answer is the experts' exact key. On the right, it counts when that key is anywhere on screen: HomeNote lists its top three, and Auto-Key 2 has a switch that flips its answer to the relative key.
Song by song
HomeNote and Auto-Key 2 agree on most songs. Where only one of them is right, it is HomeNote on 89 songs and Auto-Key 2 on 26.
- Both right 374
- Only HomeNote right 89
- Only Auto-Key 2 right 26
- Neither right 195
What the wrong answers were
Not all misses are equal. A relative key (A minor for C major) uses the same seven notes, so Auto-Tune corrects the same way. A fifth away is one note different. The same root with the wrong major or minor is three notes different.
- Exact key
- Relative key (same notes)
- A fifth away (one note off)
- Same root, wrong major/minor
- Something else
Major and minor
A key finder that leans toward one mode scores well on those songs and badly on the others. The closer the two dots, the more even-handed the tool. libkeyfinder gets 38.5% of major-key songs; HomeNote and Auto-Key 2 are within 7 and 4 points across the two.
- Major-key songs
- Minor-key songs
The numbers.
| HomeNote | Auto-Key 2 | libkeyfinder | |
|---|---|---|---|
| Exact key, all 684 songs | 67.7% | 58.5% | 53.9% |
| Exact key, hip-hop half | 62.9% | 53.2% | 53.2% |
| Exact key, other half | 72.5% | 63.7% | 54.7% |
| Main key or its relative (same notes, same Auto-Tune correction) | 73.1% | 64.5% | 60.7% |
| Right key shown on screen | 83.8% in its top 3 | 64.5% main or relative switch | 53.9% one answer |
| Standard partial-credit score (MIREX) | 72.0 | 65.8 | 61.9 |
How sure we are: resampling the songs 3,000 times, HomeNote's lead over Auto-Key 2 on exact key stays between +6.1 and +12.4 points (95% range). Song by song, HomeNote was right on 89 songs Auto-Key 2 missed, and Auto-Key 2 was right on 26 HomeNote missed.
The songs
684 full songs from the Free Music Archive, keyed by music experts in the FMAK dataset (Stella Wong, ISMIR 2023; zenodo.org/records/10719860). None of them were used to train, tune or test HomeNote before this test.
- 342 hip-hop songs: every FMAK song tagged hip-hop, rap, alternative or abstract hip-hop, or hip-hop beats.
- 342 songs from everything else, spread evenly across rock, electronic, folk, pop, instrumental, classical, experimental, international, jazz, country, R&B, blues and older recordings (smaller genres gave all they had). Picked at random with a fixed seed.
- The answer key is the experts' label. A tool is right only if it names that exact key.
The setup
- One computer for everything: a 2017 iMac Pro running Windows (Boot Camp), with the same audio files.
- HomeNote: the Windows release build, given each whole song.
- Auto-Key 2 (Antares; its detection engine is zplane's TONART v3): its File Mode in FL Studio, which analyzes the whole file. The key was read off its display, with a check that the display showed the right file name before each answer was recorded.
- libkeyfinder: the open-source engine inside Mixxx and KeyFinder, built from source with its default settings, given each whole song.
What this doesn't show
- One label per song. Some songs are honestly ambiguous, and an expert's call decides "right" for every tool alike.
- Auto-Key 2 was tested in File Mode only, its whole-file analysis. Its Listen Mode wasn't tested.
- Accuracy isn't everything: Auto-Key 2 sends its settings straight into Auto-Tune, and HomeNote doesn't.
- A test set we built ourselves on short vocal loops is left out until we've confirmed none of it overlaps HomeNote's training material.
Check it yourself
- homenote-key-test-songs.csv FMA track id, artist and title, genre, the experts' key and the song's licence, for all 684 songs
- homenote-key-test-results.csv every tool's answer for every song
The audio itself comes from the public FMAK and FMA datasets; each song keeps its artist's Creative Commons licence, so we link to it rather than re-share it.
Auto-Tune and Auto-Key are trademarks of Antares Audio Technologies. HomeNote is an independent project, not affiliated with Antares.