happytails.ai
English

Music key detector

Estimate the key of a song or recording, with the closest alternatives and a pitch class profile, so you can confirm it by ear.

No files selected

Accepted files: .wav,.mp3,.m4a,.aac,.flac,.ogg,.oga,.opus,.webm,audio/*. Choose one file. Up to 256 MiB in total.

Your result

How to use Music key detector
  1. Choose one audio file from your device.
  2. Set a start and end time if the key changes or you only want one section.
  3. Run the estimate and read the most likely key and the next choices.
  4. Play the tonic scale on an instrument to check the result, then download the JSON report and the ranking CSV.

Report a problem or share an idea.

Useful next steps

How the estimate works

The tool measures how much energy falls on each of the 12 pitch classes between about 65 Hz and 2,100 Hz, using 170 millisecond frames. It then correlates that profile with the 24 major and minor key profiles of Krumhansl and Kessler (Cognitive Foundations of Musical Pitch, 1990) and ranks the keys by correlation.

Reading the result

The result is an estimate. Relative keys such as C major and A minor share the same notes, so they often rank close together; the lead over the next key shows how clear the choice was. Music that modulates, uses modes or has strong drums can mislead the estimate. Check by ear before you rely on it.

What is not included

Key changes are not tracked over time. Choose a start and end time to test one section. Tuning that is far from A = 440 Hz shifts energy between pitch classes and lowers the confidence.