A key part of any tertiary musical education is learning about all the wonderful (and less wonderful) types of chords out there. Typically this involves a great deal of exercises involving the identification of a given chord from its component notes. But how would you do this programmatically? Well, thankfully, the developers behind the WhatChord tool are happy to explain just how it’s done.
The problem with classifying chords is that the way musicians use them and construct them can be quite varied. Names can also be applied somewhat differently depending on the musical context of a given set of notes. To suit the musical reality of real players and composers, WhatChord uses a specially-developed scoring algorithm to try and nut out what a chord is actually supposed to be.
As an example, a major chord must require a root note and a major third interval. It can optionally include a perfect fifth. However, if there is a minor third, minor seventh, or major seventh present, then you’re almost certainly not looking at a simple major chord. WhatChord takes these things into account by weighting the different tones present and seeing which chord gets the highest score. The required notes add weight, while notes that shouldn’t be there add a penalty to the score. Then there are extra penalties for ambiguous “unexplained” tones, extensions, and a few other parameters to disambiguate edge cases.
If you’d like to see how it works in practice, you can check out the WhatChord app and see how good it is for yourself. Alternatively, explore some of the other chord-focused projects we’ve featured over the years, or send your best musical projects into the tipsline.
[Thanks to baschwar for the tip!]

Another cool way to do this is to properly learn music theory. A fun exercise is taking any arbitrary collection of notes and naming the chord.
I guess, but for example Am7 can be Cmaj/A and the context determines which one. For example, you might have a succession of chords where the Cmaj part stays the same, but the root note descends. Then you get: Cmaj/A, Cmaj/G, Cmaj/F rather than Am7, Cmaj/G, Csus4 (though I know Csus4 isn’t quite the same as it lacks an ‘E’).
The real fun, for myself, is those pedal tone chords on chromatic bassline walks. Chords like Cmaj with G# bass note(the chromatic note between G and F in a pedal tone walk). In my notation however chord/chord implies two seperate chords, though i see the behind the slash note as a bass note frequently. Cmaj/A is Amin7, Cmaj/G is simply Cmaj, and Cmaj/F is Fmaj7. The bass note is somewhat arbitrary, the root note is canon to the chords name. The root note is not explicitly the lowest note, bassists and arrangers can make numerous bassline choices that dont change the chords identity.
Accidentally bumped “Report” with my thumb on my tablet. Apologies. I really wish HaD would change it, at least give us an “Undo” option for these unintentional situations.
I want actually offended by your slight of Cmaj/A. This time…
i do that all the time lol
Will ChatGPT do the job?
The AIs will try to do almost everything, but they only manage to do a few of things particularly well.
didn’t ryan gosling whip up some software real quick to do this in Project Hail Mary in order to understand things being said by his interstellar bromantic partner?
Seth makes a good point but for someone like me who doesn’t play but often here’s something that sounds cool and I want to know what the chord is, thus is a cool find.
Its a fascinating concept, but as Greg A points out there is no shortcut because the intentions of composers and performers are not standardized.
I frequently compose chord progressions where 2 chords or multiple scale modes are utilized simultaneously and this dimensionality is already orders above this notion. As a learning tool I can see use, but as I found out these chord charts computers cant make complex determinations. Useful for guitar chord learning but not for analysis of 12 tone pieces
Please make this a bot for /r/musictheory/
i feel like it’s a mountain out of a molehill. It’s an easy skill to learn and it’s not computatinally complicated if you are given a list of simultaneous notes. All of the sophistication is to recognize its role, to recognize the chords it suggests or the way it relates to the notes before and after.
Like if it is given C# E, by the decision matrix above, that’s C# minor with certainty +9 (required tones present 2x+4, bass is root +1). And it’s A major with certainty -1 (1 required tone present +4, 1 required tone absent -6, bass is inversion +1). And it’s Emaj6 or Emin6 +0.5 (1 required tone present +4, 1 required tone absent -6, bass is root +1, optional tone present +1.5?).
As a musician, i’m going to interpret those two notes as roughly equally suggestive of all 4 of those chords. I’m not going to consider C# minor to be at all more likely than Amaj. But in the context of a specific piece, i’m likely to pick one or two of them with some confidence. My point is, that more holistic process is the only way to at all understand the chord, and doing it intuitively (and internally) and embracing the ambiguity is the only way to develop an understanding of the role of chords in music.
It does remind me of a tool i made to take a chord and describe all the ways to finger it on guitar. The first draft of that tool was pretty simple but then i started to add a more detailed model of the way my fingers can stretch across the fret board and it became much more complicated. There are a ton of ways to finger a guitar! That process had a lot more algorithmic sophistication to it. I’m not sure it had any value either though…replacing musical steps with computer steps is rarely very fruitful, especially in education. fwiw i play “shell chords” now instead :)
This reminds me of stories about Allan Holdsworth who fanatically tried out all combinations of notes and gave the resulting chords his own names and symbols, music theory be damned. And now when musicians on Youtube try dissecting his music, they have problems describing what he does using official terms.
Jazz musicians in general hack the system by writing incomplete chords, and using numbers instead of letters. So if the chord is ii7 it might mean Dm7 but also Dm7b9, depending on where you are in the song and what mood you’re in.
It’s a fascinating subject nevertheless and I’m not sure if musical education makes it easier to learn or just makes the barrier to entry higher. I mean, you can learn harmony without knowing musical notation, for example, and this article kind of proves it.