Free Key Detector Online
Find the musical key of any song. Get the Camelot code and compatible keys for harmonic mixing — entirely in your browser.
Drop your audio file here or click to browse
MP3, WAV, FLAC, OGG, AAC — up to 200 MB — processed entirely in your browser
What Is Musical Key?
The musical key of a song defines the set of notes (scale) that form the foundation of its harmony and melody. Every key has a root note (also called the tonic) and a mode — either major or minor.
Major keys use the major scale pattern (whole-whole-half-whole-whole-whole-half) and tend to sound bright, uplifting, and energetic. In electronic music, major keys are common in uplifting trance, melodic house, and euphoric EDM.
Minor keys use the natural minor scale pattern and create a darker, moodier, or more emotional feel. Most techno, deep house, and melodic techno tracks are written in minor keys — it's the dominant tonality in underground electronic music.
Knowing your track's key is essential for harmonic mixing (blending tracks in compatible keys), sampling (pitching samples to match your project), and collaboration (communicating the tonal center to other musicians or vocalists).
What Is the Camelot Wheel?
The Camelot Wheel (also known as the Camelot System or Harmonic Wheel) is a simplified representation of musical keys arranged in a circle. It was designed to make harmonic mixing intuitive for DJs who may not have formal music theory knowledge.
Each key is assigned a code consisting of a number (1-12) and a letter (A or B). The letter indicates the mode: A = minor, B = major. For example, A minor = 8A, C major = 8B.
The beauty of the system is its simplicity: keys that are adjacent on the wheel sound good together. You can safely mix tracks that share the same code, differ by 1 in number (same letter), or share the same number (switching between A and B). This gives you three harmonically safe mixing options from any starting key.
For example, if you're playing a track in 8A (A minor), you can mix into 7A (D minor), 9A (E minor), or 8B (C major) — all will sound harmonically smooth.
How Key Detection Works
This tool uses the Krumhansl-Schmuckler algorithm, a well-established method from music psychology research. The process works in several steps:
First, the audio is decoded and divided into overlapping frames. For each frame, a Fast Fourier Transform (FFT) converts the audio from the time domain to the frequency domain, revealing which frequencies are present and how strong they are.
Next, the frequency data is mapped to 12 pitch classes (C, C#, D, D#, E, F, F#, G, G#, A, A#, B) to create a chromagram — a summary of how much energy exists at each musical note, regardless of octave.
Finally, this chromagram is compared against 24 reference profiles (one for each major and minor key) using Pearson correlation. The key whose profile best matches the track's chroma distribution is the detected key. The confidence score reflects how strongly the best match stands out from the alternatives.
Why Key Matters in Electronic Music
In electronic music production and DJing, understanding musical key isn't just theory — it has direct practical applications that affect how your music sounds and how your sets flow.
For DJs: Harmonic mixing has become a standard technique. Mixing tracks in compatible keys creates smooth, musical transitions where melodies and basslines blend rather than clash. Tools like the Camelot Wheel make this accessible even without music theory knowledge. Going from 8A to 7A sounds seamless; jumping from 8A to 3B will likely produce audible dissonance.
For producers: Key detection helps when building a track around a sample, layering vocal chops, or creating mashups. If your track is in F minor and you want to add a vocal from another song, knowing that the vocal is in Ab major (the relative major) tells you it will fit naturally without pitch-shifting.
For labels and A&R: Key information is metadata that streaming platforms and DJ software use. Tracks tagged with accurate key data are more discoverable in DJ software like Rekordbox and Traktor, and they integrate better into automated playlists.
Camelot Wheel Reference
Complete mapping of musical keys to Camelot codes. Minor keys use the A column, major keys use B.
| Camelot Code | Minor Key (A) | Major Key (B) |
|---|---|---|
| 1 | G# minor (1A) | B major (1B) |
| 2 | Eb minor (2A) | F# major (2B) |
| 3 | Bb minor (3A) | Db major (3B) |
| 4 | F minor (4A) | Ab major (4B) |
| 5 | C minor (5A) | Eb major (5B) |
| 6 | G minor (6A) | Bb major (6B) |
| 7 | D minor (7A) | F major (7B) |
| 8 | A minor (8A) | C major (8B) |
| 9 | E minor (9A) | G major (9B) |
| 10 | B minor (10A) | D major (10B) |
| 11 | F# minor (11A) | A major (11B) |
| 12 | C# minor (12A) | E major (12B) |