Deriving Keys from Chords in Music
butternotes.comThis post shows that some very simplistic algorithms can’t unambiguously determine a key. But I don’t think it establishes that a more sophisticated algorithm could not. Key center is not just based on chords and notes in a scale. It’s based on the note/chord that seems like the place where the music is at rest, or at home. Many songs have non-diatonic chords, but it’s still fairly obvious what key they are in.
That said, there are examples where they key is ambiguous even to humans (e.g. Hey Joe [C G D A E], or Sweet Home Alabama [D C G] but disputed whether it’s in G or in D).
Adam Neely released a pretty in-depth video recently with the opinion that Hey Joe is straight-forwardly in the key of E, as long as you don't get stuck trying to fit it into a diatonic, traditional Western framework. It's a good watch.
https://www.youtube.com/watch?v=DVvmALPu5TU
I had an unanswered question after the video -- are there listeners who don't feel that sense of "home" when arriving at the E chord? I certainly do feel "at home" on the E, but I'd be curious to hear others' opinions.
I’ve played it a fairly large amount in bands. First time I have heard that it’s in the key of E. Totally makes sense to me especially in the Hendrix version with the semi chromatic bass walk to E.
I think context is important. If you are talking about guitar based music, then E is a pretty safe bet as home. But what if a group doesn’t use standard tuning? The first two examples that come to mind are Alice In Chains and Tool. They use E flat tuning and drop-d tuning, respectively (mostly). When I listen to them, Eb and D are home.
The instrument tuning doesn't change the fact that a song has a key/home.
If someone plays it in another key, transposes it etc, it will still have a specific key, just transposed.
In this case of course it's about the Jimi Hendrix recorded cover version, not trying to get some key that would hold across all possible versions.
It feels like home because of the key of the song, not the instrument. Sometimes the guitar is tuned to play a song where the key matches the lowest string, but many songs are of course played in other keys.
Jimi played in Eb a lot too. Kurt Cobain and SRV too.
That’s cos it sounds heavier but the key is relative.
Yea, and it's possible to write chords such that it's actually ambiguous where the tonal center is. To some extent, every (successive diatonic) chord narrows it down, but it's possible that there simply isn't enough information to narrow it down to one key. Or they did something non diatonic to what was happening before, and you have to readjust.
Yeah that definitely doesn't show algorithms are worse than humans.
Related: When I was off work in December I used graph theory to find chord paths through keys:
You can see from the graph that chords exist in multiple keys and you can move from one key to another via these shared chords known as 'pivot chords'
This is great!!! Any thoughts on expanding it out to assist chord sequencing?
Talking about this stuff without saying what kind of music you mean seems a little silly. There is a reference to "one popular song", and it seems the author is thinking of pop music. But it seems most things that can be said about keys/chords in one genre/tradition/style, don't apply to others. And even within genres, things naturally evolve so that old rules no longer apply.
Yup! Adam Neely has a great video[0] talking about how serious of a role any theoretical framework has on understanding the music itself -- and how in the US at least, we very often prescribe European standards of harmony on music.
The popular song is "Creep" by Radiohead.
> A song could reasonably have a chord progression such as {Am, G, D, Am, G, Dm}, and the inclusion of both {D} and {Dm} would cause conflicts. Given that music theorists cannot agree on this stuff, there doesn't seem to be anything a computer can do that is better.
Whilst I'm no expert, I'm pretty sure we have hundreds of years of examples of borrowed chords [1] for music theorists to agree upon, so yes plenty of things a computer could do better (as per other comments).
Actually, music is a living art... so for example some blues chords progression would be "impossible" in classical music. And some "free jazz" or multimodal progression wouldn't work in blues
The point is: a computer is good to analyse something following a fixed set of rules, but not so good to analyse something that work by "breaking rules", like art. It's quite "easy" to write some program for classical music, or blues, or rock, or any specific music style... but it will hardly work for a different music style because the progression and interpretation of chords will be different
One useful heuristic (at least, the one I usually go to first if I'm not sure what key a song is in) is that root of the final chord of the song is often the same as the root of the key. I suppose that probably works better for some music traditions than others. Also I believe some songs in a minor key sometimes end by converting the root chord to major.
This is a good point, though there are many common patterns, some start at 1 and others do not.
In college I built a project that could reasonably well predict the key of a given piece based on the distribution of note usage. For example, most pieces written in a major key would have the highest usage of the root, and the dominant of a key.
This obviously has a number flaws, but worked remarkably well for western music written between 1600 and 1900.
Is the first example with C and Am correct? It says the first chord of Am scale is A, shouldn't it be Am?
No, the first note of Am is definitely still A. What makes the difference between major or minor etc are the notes that come after.
For example, the A major scale goes A, B, C#, ..., while A minor uses the minor third, so you get A, B, C, ... etc.
The error in the article was fixed. I was referring to the first chord in the Am scale, not the first note. In the original article it said the first chord in Am is A, which was wrong.
It could be a typo. Thanks for pointing it out.
yeah
I had never thought about a key of a song being ‘variable’ but being set in stone. Interesting to have a mindset challenge.
If you can't tell the difference, perhaps the answer is both.
I definitely thought this was going in a cryptography direction from the title. I actually kind of like the idea of composing music to generate a secret key :)
Awesome. So what key is Revelation Song by Phillips Craig and Dean in?
It sounds like a I-v-bVII-IV progression in F# major. If you want to get modal, you could call it F# mixolydian.
Hilariously, that was subject to a debate amongst music theorists.
I am no musician. I heard quite a few musicians, with or without innate perfect pitch, can tell the keys in a chord, though maybe not to the 100% accuracy. For example, something like what the kid is doing in this video [1]. I am a bit surprised that this can't be done programmatically.
”Key” in this context refers to key signature rather than physical keys on a keyboard.
Thanks for the correction, but the key signature in a piece may be changing. Also, those with perfect pitch can tell the key signature from a short passage if there are few accidentals.
A common idea is doing modulation. It's usually an easy way to increase the excitement of the song. Most people can naturally hear and feel it, but maybe not have the vocabulary to describe what's happening.
Well, that's the thing -- when listening to any song, even if you know the pitches, it is impossible to know if there are accidentals or not depending on the phrase. If a 10-bar phrase modulates in bars 2-5, and you listen to bars 2-5, you may conclude the piece is in key X when it's just a modulation from the overall key of Y. This also implies the piece follows western common practice, or is even tonal in the first place. The difficulty of categorizing music is its ambiguity :)
The blog post criticizes existing software for their inaccuracy, but that is not their problem. The key signature of a particular passage may deviate from the overall key. I also wonder how they evaluate accuracy shown in [1] and what is the human accuracy in comparison.
[1] https://www.reddit.com/r/DJs/comments/hwlzyt/key_detection_c...
Fast Fourier transform can be used to identify the pitches in a sounds sample. There are other methods but FFT gets the most press.
FFT is pretty bad at doing the lower pitches. Way too many notes will find their way into the same bin. And if you want more resolution you'll need an impractical FFT size.