Improving chord complexity algorithm

Hi!

I was checking the chord complexity score for several songs but sometimes it seems that the algorithm is tripping a bit. For example it gives this Ariana Grande song a score of 100. It has a nice gospel progression but giving it the maximum score seems like a stretch.

Could this have something to do with how the chord is played rhythmically? Maybe the algorithm could be improved by only taking into account unique chords in the sequence of by disregarding multiple instances of the same chord directly behind each other?

I would for example expect that this song would rate higher than the Ariana Grande song:

Would love to use the scores in the database for research, having them more accurate would be great!

Thanks for the great resource!

I personally don’t pay much attention to the chord and melody metrics when looking at TheoryTabs, so I can’t really comment on whether this is just a rare exception or if this algorithm is fundamentally flawed, but this particular comparison is certainly wild.

I will say though that there is likely an upper threshold of complexity above which no further distinctions are being made, as Hooktheory’s primary focus is on commercial pop music. So the 100th percentile for chord complexity will likely contain songs with widely varying degrees of harmonic complexity.

Unfortunately the Chord And Melody Metrics About Section is more of a beginner level introduction to western music theory and barely contains any information on how these metrics are being determined. The only two factors mentioned for the chord complexity metric are diatonic dissonances and non diatonic notes. It doesn’t mention anything about distinguishing between different types of non diatonic harmony, e.g. chords from parallel modes, supermodal chords and applied chords. Since these metrics are comparative values, I would assume that the relative quantity of dissonant and non diatonic notes within a progression is one of the most important factors for determining a TheoryTab’s relative complexity.

The About section also doesn’t say anything about factoring in chord timing, but it’s an interesting theory. I’ve gone ahead and edited the Tab, as the current chord timing violates the Contributor Guide. It will be interesting to see whether that changes the chord complexity metric. Some of the chord labels would need to be changed as well, but for the sake of this experiment I will hold off on that for now.

there is also something goofy with chord-melody tension in this tab right here: o8y by kjg Chords, Melody, and Music Theory Analysis - Hooktheory

Okay, now I’m starting to question the sanity of this algorithm. The Chord Complexity dropped to 97, which implies that the chord timing does indeed influence the complexity score. I don’t think that’s ideal, but it’s only a minor change, so nothing to get mad about.

What really freaks me out are the Chord Progression Novelty and Chord Bass Melody metrics. The novelty score went from 85 to 100 and the bass melody score went from 21 to 39. The only change I made apart from simplifying the timing is that I removed the very last ii7b5 chord. How can such a minor change have such an immense impact?

The database currently contains over 52 thousand TheoryTabs, so each percentile contains a little over 520 Tabs. So this progression is now all of a sudden more “novel” than the 7800 Tabs that were previously rated higher, just because I removed one single chord from a 27 chord progression? I don’t think that makes any sense.

I’ve now corrected the roman numerals in that Tab as well. Will be interesting to see whether that changes the metrics in any way. The chords are all the same, I just labeled them differently, so that the chord function is reflected in the roman numerals.

Thanks for being as invested as me! I was interested in doing a data project about how complexity of music has changed over the years. Was thinking about creating my own algorithm to derive a complexity level from chords, but this felt like a great resource. But I might be better off devising my own algorithm, but might need to level up my music theory knowledge a bit. What elements do you think should be considered to determine complexity based on a set of chords?

Good catch! Would be cool if the dev’s could look into it at some point to determine what triggers these scores.

it seems like the chord melody tension relies on note names. Hookpad thinks that placing a D# note over an Eb major chord is very dissonant

1 Like

If you’re looking for reliable data, I wouldn’t recommend using this database as a resource. It’s a database of user submitted content with almost no moderation, where everyone can just create an account and edit tabs at will. And unfortunately it’s not like with Wikipedia where the community of contributors is big enough that you’re unlikely to run into an article that is full of false information. There’s only a small group of competent contributors on here, so there’s naturally an immense amount of faulty transcriptions, but on top of that there’s also a lot of vandalism going on, where people intentionally make existing transcriptions inaccurate.

I generally think Hooktheory’s approach of “higher polyphony = more intervallic relationships = higher complexity level” is very reasonable. On top of that you could create a hirarchy of harmonic intervals based on their just intonation frequency ratios. The octave being the least complex at a ratio of 2:1 and the tritone being the most complex at a ratio of 45:32. Thereby a diminished triad would be rated more complex than a major or minor triad, as it contains a tritone. These are strategies to rate the complexity of an individual chord, I’m not sure how one would objectively rate the complexity of a chord relationship though.

You could make an argument that a functional progression that makes heavy use of applied chords is more complex than a non functional progression that randomly throws in non diatonic chords, however that would not be a very objective measure and would probably confuse complexity with sophistication. So I would probably just measure the relative amount of non diatonic notes within the progression, factoring in duration as well. Another factor I would also take into account is key changes.

1 Like

You could of course create a hirarchy of non diatonic chords based on how frequently they’re being used. So the most ordinary chromatic harmony in a major key would be chords from the parallel minor key like iv or bVII and applied dominants like V/V or V/vi. The most unusual chromatic harmony would probably be supermodal chords like bii or bvii°. But it’s probably a bit of a stretch to call that a measure of complexity. Uniqueness or inventiveness would likely be a better label for that kind of ranking.

What are you on about? A doubly augmented 9th is an extremely dissonant interval on a major triad! :joy:

what i am saying is that chord melody tension can be messed up because sometimes putting a b-flat note over a b-flat chord will make it put a-sharp for some reason and i dont know how to fix that reliably

also i have noticed that the spam song you edited a while ago has 100 chord progression novelty for some reason?

Just borrowing a chord from phrygian dominant shouldnt bump it up to 100

It was a joke, mate. A doubly augmented 9th is enharmonically equivalent to a major 3rd, so absolutely no dissonance there. :smiley:

It’s actually pretty funny how Hookpad is apparently incapable of using accidentals in a sensical manner. Not only in the melody staff, but chords are spelled incorrectly as well. I’ve just never noticed that before, because I usually have the piano hidden. I can’t seem to find any logic in those accidentals, they just seem so random and apparently you can’t even influence which one it uses. Whether you raise the lower scale degree by half or lower the upper scale degree by half results in the same accidental.

Yeah, another great example. I’m sure there are a bunch of songs in phrygian with a major tonic chord, so novelty at 100 doesn’t seem right. Also what’s with that chord complexity? It’s just a bunch of seventh chords, one of them borrowed and one of them inverted. There’s much more complex stuff on the database.

“Oh, you want the note between the 5th and 6th scale degree? Sure, let’s just raise the 4th scale degree by 3 half steps!” :joy: :joy: :joy:

off topic but, ah yes, A major is definitely in the key of B Locrian and the chord sure does sound major!

I messed around with some chord data and somehow created this, I cannot recreate it

1 Like

It seems like this can be avoided by paying attention to the way we enter non-diatonic notes. Lowering diatonic notes by half step will reliably add flats/remove sharps and raising diatonic notes by half step will reliably add sharps/remove flats. The piano does sometimes show wrong notes, but that can easily be fixed by closing and reopening it.

The only issue is that enharmonic equivalents of diatonic notes are not available. So placing root notes over Cb and Fb chords in the key of C major will always result in an extremely high Chord-Melody Tension score, as Cb and Fb aren’t available in the note staff.