Drop in a song to find its musical key, whether it is major or minor, its tempo in BPM and its Camelot code for harmonic mixing. The tool analyses the notes in the audio on your device and shows the scale, the chords that fit and how sure it is.
Last updated:
Choose a song, or press Try a demo clip to see how it works.
Key
–
Camelot
–
Tempo
–
Relative key
–
Notes in the scale
Pitch-class profile
Bars: how much of each note the song contains. Dots: the expected profile for the detected key.
Most likely keys
Key over time
Advertisement
Advertisement
How to use the Song Key Finder
Choose a song: drop an audio or video file on the box, or press Try a demo clip.
Wait a few seconds while the notes and rhythm are analysed on your device.
Read the key, its Camelot code, tempo and confidence. A close-call note appears when two keys are almost tied.
Check by ear: play the scale or the tonic chord along with the song; the right key's tonic chord sounds like “home”.
Copy the result or switch the key profile and note naming to compare.
How key detection works
The finder follows the classic key-finding method used in music information retrieval:
Spectrum: the audio is resampled to 22,050 Hz and cut into overlapping frames of 8,192 samples (about 0.37 seconds). Each frame is transformed with an FFT, and spectral peaks between 55 Hz (A1) and 3,520 Hz (A7) are located with sub-bin accuracy.
Tuning: the average distance of all peaks from the nearest equal-tempered note gives the recording's tuning offset, which is removed before the next step.
Chroma: each peak's frequency becomes a note number, n = 69 + 12 × log2(f ÷ 440), and its strength is added to one of the 12 pitch classes. Summed over the whole song this gives the pitch-class profile.
Key profile matching: the profile is compared with all 24 rotated major and minor key profiles using the Pearson correlation coefficient. The best match is the key; the gap to the runner-up drives the confidence score.
Krumhansl-Kessler key profiles
In probe-tone experiments (1982), listeners rated how well each of the 12 notes fitted after a key had been established. These ratings are the default template; the tonic, fifth and third rate highest.
Scale step
1
♭2
2
♭3
3
4
♯4
5
♭6
6
♭7
7
Major
6.35
2.23
3.48
2.33
4.38
4.09
2.52
5.19
2.39
3.66
2.29
2.88
Minor
6.33
2.68
3.52
5.38
2.60
3.53
2.54
4.75
3.98
2.69
3.34
3.17
Camelot wheel reference
Code
Minor (A)
Major (B)
Code
Minor (A)
Major (B)
1
G♯ minor
B major
7
D minor
F major
2
E♭ minor
F♯ major
8
A minor
C major
3
B♭ minor
D♭ major
9
E minor
G major
4
F minor
A♭ major
10
B minor
D major
5
C minor
E♭ major
11
F♯ minor
A major
6
G minor
B♭ major
12
C♯ minor
E major
G♯ minor is also written A♭ minor, and E♭ minor as D♯ minor. For a smooth mix, move to the same number, one number up or down, or swap A and B on the same number.
Frequently asked questions
How does the song key finder work?
It computes a chromagram: the song is split into short frames, each frame's spectrum is analysed, and the energy of every note is folded into the 12 pitch classes (C, C♯, D … B). That pitch-class profile is correlated with the 24 major and minor key profiles measured by Krumhansl and Kessler, and the key with the highest correlation wins.
How accurate is automatic key detection?
For most pop, rock, electronic and classical music with a clear tonal centre the top result is right most of the time. The most common error is confusing a key with its relative major or minor (for example C major and A minor), because they share the same notes. Songs that change key, use modes like Dorian or Mixolydian, or are mostly drums are harder.
What is the Camelot code?
The Camelot wheel numbers the 24 keys from 1 to 12 with A for minor and B for major, so that keys a step apart on the circle of fifths are neighbours. DJs mix tracks with the same code, one number up or down, or the same number with the other letter for a smooth harmonic transition. For example A minor is 8A and C major is 8B.
What is a relative key?
Every major key shares its notes with a minor key three semitones lower: C major and A minor, G major and E minor, and so on. They have the same key signature, but a different tonal centre. The parallel key has the same tonic but the other mode, such as C major and C minor.
How is the BPM measured?
The tool builds an onset envelope from spectral flux (how quickly the spectrum gains energy, which peaks at drum hits and note attacks) and finds its strongest periodicity with autocorrelation between 50 and 220 BPM, preferring tempos near 120 BPM. Half and double values are shown because many songs can be counted either way.
Why does the tool show the tuning (A4 = … Hz)?
Not every recording is tuned to A = 440 Hz; some older records and orchestras use 442 Hz or drift because of tape speed. The analysis measures the average deviation of the notes from equal temperament and compensates for it, which also tells you how to tune your instrument to play along.
Are my songs uploaded?
No. The audio is decoded and analysed by JavaScript in your browser, so your files never leave your device. Only the first 20 minutes of very long files are analysed.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.