How to Find the Key of a Song or Sample
After this lesson, you'll be able to find the key of a loop, a track or a sample, first by ear and then by checking the notes, and you'll know what to make of it when an automatic detector gives you a strange answer.
You now know what a key is. That leaves the question every producer asks several times a week: what key is this sample, this loop, this track I want to remix in? Automatic tools answer in a second, but they're wrong often enough that it's worth knowing how to check. We'll follow a three-step method: your ear, then the notes, then the choice between two possible answers.
Ear first: the note that resolves
Always start by listening, without looking at any screen. Let the loop play several times and look for the note that feels like an arrival, the one you could stop on. Hum it. If nothing stands out in the melody, listen to the bass: in most loops, the bass or the 808 comes back to the tonic at the start of the cycle or at the moment it resolves. Try it with the next loop.
You probably felt it: every time the loop starts over, the first chord sounds like a return. Its lowest note, played by the bass, is D. That's our candidate for the tonic. And since that first chord sounds dark, we can already bet on D minor. It's only a hypothesis so far, but it's an ear-based hypothesis, and it's often the right one.
Then the notes: take inventory
Second step: write down the notes you hear, or that you see in the piano roll if you have the MIDI file. In our loop, the first chord contains D, F and A; the second B♭, D and F; the third F, A and C; the last C, E and G. Put them in order without duplicates and you get C, D, E, F, G, A and B♭: seven notes, with a single flat.
Now you need to find which scale contains exactly these seven notes. With a flat on B, they're the notes of F major, and so also of its relative, D minor. The notes give us two candidates. Our ear had already told us which one to choose. The next tool does this inventory work with you.
Click the notes you hear in the loop or the sample, without worrying about the octave. The site looks for the major and minor scales that contain all of them.
Possible keys
All your notes are in this scale. A minor seems more likely, because more of its tonic chord is in your notes.
One note does not fit: B.
One note does not fit: F.
Why two answers every time?
A major scale and its relative minor use exactly the same seven notes. The A minor scale is the C major scale played from its sixth note, A: the notes stay the same, only the note that sounds like home changes.
To decide by ear, listen for the note the melody lands on at the end of a phrase, and the note the bass plays on the first beat of the loop. If it is A, you are in A minor; if it is C, you are in C major. You can also compare the two “Try” buttons: the one that sounds like arriving home is the right one.
If you enter the seven notes of our loop, the tool will suggest F major and D minor side by side. That's not the tool hesitating: it's the musical reality, and it's up to you to decide.
Why there are often two answers
This is the point that confuses the most producers, so let's take our time. The seven notes of a major scale always correspond to two relative keys, one major and one minor. So the notes alone can't decide. What decides is where the music comes to rest: the note the bass keeps hammering, the chord the loop starts or ends on, the note that closes the melody. Listen to a second loop, made of exactly the same notes.
This time, the loop always starts over on a bright chord built on F, and the bass comes to rest on F. Same notes, different home: we're in F major. A detector that only looks at the notes will give the same answer for both loops. Your ear, on the other hand, can tell the difference, because it hears where the music comes to rest.
Automatic detectors and their mistakes
Many sample sites, plugins and some DAWs analyze an audio file and display a key. These tools are very handy for sorting a sound library, but you need to know how they go wrong. Here are the most common mistakes.
- They confuse relative keys: they say F major for a loop in D minor, or the other way around, because the notes are the same.
- They hesitate when a sample contains only a few notes, for example a two-chord loop that leaves out precisely the note that would tell two neighboring keys apart.
- They get thrown off by a note from outside the scale, such as the raised seventh note of the harmonic minor, which we'll see in the next lesson.
- They get it wrong when a sample isn't tuned to A at 440 hertz: the answer can then land a half step away from the real key.
- They display an answer even for a drum loop or a noise, which doesn't really have a key.
So take a detector's answer as a first lead. Check it by ear, with the note that resolves and the bass note, and always think of the relative key before deciding it got it wrong.
A sample's key moves when you pitch it
One last, very practical point: when you transpose a sample, its key moves with it. Each half step of transposition shifts the tonic by one row. A sample in A minor raised by three half steps moves to C minor; lowered by two half steps, it moves to G minor. The mode doesn't change: a minor sample stays minor.
| Transposition | Original key | New key |
|---|---|---|
| +1 half step | A minor (Am) | B flat minor (Bbm) |
| +3 half steps | A minor (Am) | C minor (Cm) |
| -2 half steps | A minor (Am) | G minor (Gm) |
| +5 half steps | E minor (Em) | A minor (Am) |
| +12 half steps | D minor (Dm) | D minor, one octave higher |
The method that follows is simple. Find the key of the sample, compare it with the key of your track, count the half steps between the two tonics, and transpose by that amount. Choose the smallest gap whenever you can, up or down: beyond a few half steps, a voice or an acoustic instrument often starts to sound artificial. And if the sample is in the relative of your key, there's no need to transpose it: its notes are already the right ones.
Your track is in G minor. You find a piano loop that a site labels “Em”. Listening to it, you confirm that its bass comes back to E and that it really does sound minor. How many half steps do you need to transpose it, and in which direction, to bring it into your key?
So far, our minor scales have used only natural notes. In the next lesson, we'll change one or two notes of the minor scale to get two colors that producers use a lot: harmonic minor and melodic minor.