Musical Key Detector

Estimate a song's major or minor key using pitch-class energy and tonal profiles, with alternative keys and a chroma chart.

About this tool

Musical Key Detector estimates the major or minor key of a recording by measuring which pitch classes carry the most energy and comparing them with tonal profiles. It shows the best matches and a chroma chart. It is aimed at producers, singers and DJs who want to know what key a sample, loop or song is in.

How to use

Upload tonal audio, analyze the pitch classes and compare the strongest key candidates. Confirm by ear and save your corrected key in the report.

  1. Drop a tonal audio file onto the upload area, or press Load example to analyze a generated chord pattern. The first 150 seconds are analyzed.
  2. Press Process audio. The tool reports an estimated key with a confidence value and a note when the result is ambiguous.
  3. Look at the alternative key buttons and the Pitch class energy chart to see which notes are strongest.
  4. Click an alternative to copy it into the Confirmed key field, or type your own correction after checking by ear.
  5. Press Download analysis JSON to keep the estimate, the alternatives and your confirmed key.

Production tips

  • Check the relative key. A major song and its relative minor (C major and A minor, for example) use the same notes, so the correct answer is often the second candidate.
  • Play the root note on a keyboard or in a synth while listening to the track. If it feels like home, the key is right.
  • Analyze a section with melody or chords instead of a drum-only intro. Percussion and a single repeated note rarely establish a key.
  • Once the key is known, use it to tune an 808 in the 808 Tuner, build harmony in Chord Compass or pick samples that fit.

Know the limits

Relative major/minor, modal music, detuning and key changes can be ambiguous. Percussive or single-note audio may not establish a key.

Frequently asked questions

Why does the tool say the key is ambiguous?

The result is marked ambiguous when the top candidates are close together, when the tonal center keeps changing, or when too few notes were found. Compare the alternatives and listen before you decide.

Can it detect modes or key changes?

It chooses between major and minor keys. Modal music, detuned recordings and songs that modulate can produce a confusing answer, so treat the result as a starting point.

Does it work with vocals or a cappella?

It can, provided the singing is tonal and stays in one key. Rap, spoken word and unpitched sounds do not give the tool enough pitched material to work with.

Audio is processed on your device. JavaScript is needed to use the tool.