How the key is found
The analysis measures how much of each of the twelve notes there is across the whole song, a chromagram, after filtering out drums and the extremes of the frequency range. A song in C major has a lot of C, E and G and very little C♯, and every key has its own shape.
That shape is compared with a profile for each of the 24 major and minor keys. The best match is the key; the runner-up is shown as well, because it's often the relative minor or major, or the key a fifth away, which share most of their notes. Confidence is how far ahead the winner is.







