Settings

Theme

Deriving Keys from Chords in Music

butternotes.com

83 points by dizzystar 5 years ago · 40 comments

Reader

om2 5 years ago

This 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).

  • frogulis 5 years ago

    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.

    • RHSman2 5 years ago

      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.

    • lc9er 5 years ago

      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.

      • coldtea 5 years ago

        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.

      • ragona 5 years ago

        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.

      • dkdbejwi383 5 years ago

        Jimi played in Eb a lot too. Kurt Cobain and SRV too.

  • Glorbutron 5 years ago

    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.

  • neolog 5 years ago

    Yeah that definitely doesn't show algorithms are worse than humans.

stevehiehn 5 years ago

Related: When I was off work in December I used graph theory to find chord paths through keys:

http://signalsandsorcery.com/

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'

  • RHSman2 5 years ago

    This is great!!! Any thoughts on expanding it out to assist chord sequencing?

yesenadam 5 years ago

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.

declnz 5 years ago

> 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).

[1] https://en.wikipedia.org/wiki/Borrowed_chord

  • olivierduval 5 years ago

    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

elihu 5 years ago

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.

  • dizzystarOP 5 years ago

    This is a good point, though there are many common patterns, some start at 1 and others do not.

vkhn 5 years ago

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.

XCSme 5 years ago

Is the first example with C and Am correct? It says the first chord of Am scale is A, shouldn't it be Am?

  • cvwright 5 years ago

    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.

    • XCSme 5 years ago

      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.

  • dizzystarOP 5 years ago

    It could be a typo. Thanks for pointing it out.

  • kevinwang 5 years ago

    yeah

RHSman2 5 years ago

I had never thought about a key of a song being ‘variable’ but being set in stone. Interesting to have a mindset challenge.

bluetwo 5 years ago

If you can't tell the difference, perhaps the answer is both.

justicz 5 years ago

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 :)

exabrial 5 years ago

Awesome. So what key is Revelation Song by Phillips Craig and Dean in?

  • re 5 years ago

    It sounds like a I-v-bVII-IV progression in F# major. If you want to get modal, you could call it F# mixolydian.

acmj 5 years ago

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.

[1] https://www.youtube.com/watch?v=vXivZlPu0ms&t=175s

  • nemetroid 5 years ago

    ”Key” in this context refers to key signature rather than physical keys on a keyboard.

    • acmj 5 years ago

      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.

      • dizzystarOP 5 years ago

        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.

      • peterkos 5 years ago

        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 :)

  • ksherlock 5 years ago

    Fast Fourier transform can be used to identify the pitches in a sounds sample. There are other methods but FFT gets the most press.

    • jacquesm 5 years ago

      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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection