Nerdy stuff: why are (playable) chords the way they are?

So, I am a complete Guitar & music theory newby.

I know I must just memorize the chords, but I would like to understand the algorithmic theory behind chord construction, just for fun.
To do that I wrote a little programm that should construct the best and simplest playable chord on guitar. Yes, I am a nerd :slight_smile:
Unfortunately the results do neither match Justin’s chords nor Fender’s chords. Why is that?

I understand that you can create many different chord combinations from one root note, but how to chose the right one?

For more technical people , this ist the result of my little programm:

Programmatic result for F-Chord

scale: [‘F’, ‘G’, ‘A’, ‘A#’, ‘C’, ‘D’, ‘E’, ‘F’]

triad: [‘F’, ‘A’, ‘C’]

All possible fret positions to chose from:
0: {stringNo: 0, stringName: ‘E’, fretNo: 1, noteName: ‘F’}
1: {stringNo: 0, stringName: ‘E’, fretNo: 5, noteName: ‘A’}
2: {stringNo: 1, stringName: ‘A’, fretNo: 0, noteName: ‘A’}
3: {stringNo: 1, stringName: ‘A’, fretNo: 3, noteName: ‘C’}
4: {stringNo: 2, stringName: ‘D’, fretNo: 3, noteName: ‘F’}
5: {stringNo: 3, stringName: ‘G’, fretNo: 2, noteName: ‘A’}
6: {stringNo: 3, stringName: ‘G’, fretNo: 5, noteName: ‘C’}
7: {stringNo: 4, stringName: ‘B’, fretNo: 1, noteName: ‘C’}
8: {stringNo: 5, stringName: ‘E’, fretNo: 1, noteName: ‘F’}
9: {stringNo: 5, stringName: ‘E’, fretNo: 5, noteName: ‘A’}

My program output for usage of ALL strings (very close to Justin’s approach - see below):
0: {stringNo: 0, stringName: ‘E’, fretNo: 1, noteName: ‘F’}
1: {stringNo: 1, stringName: ‘A’, fretNo: 0, noteName: ‘A’}
2: {stringNo: 2, stringName: ‘D’, fretNo: 3, noteName: ‘F’}
3: {stringNo: 3, stringName: ‘G’, fretNo: 2, noteName: ‘A’}
4: {stringNo: 4, stringName: ‘B’, fretNo: 1, noteName: ‘C’}
5: {stringNo: 5, stringName: ‘E’, fretNo: 1, noteName: ‘F’}

My program output for simplified usage of strings - maybe one A note can be muted too - resulting in the Fender F-Chord (see below)???!
0: {stringNo: 0, stringName: ‘E’, fretNo: 1, noteName: ‘F’}
2: {stringNo: 1, stringName: ‘A’, fretNo: 0, noteName: ‘A’}
5: {stringNo: 3, stringName: ‘G’, fretNo: 2, noteName: ‘A’}
7: {stringNo: 4, stringName: ‘B’, fretNo: 1, noteName: ‘C’}
All other strings muted

As a reference, those are possible F-Chords I found in the Internet:

(Complex) F-Chord according to Justin: https://www.justinguitar.com/guitar-lessons/the-f-chord-b2-90
0: {stringNo: 0, stringName: ‘E’, fretNo: 1, noteName: ‘F’}
3: {stringNo: 1, stringName: ‘A’, fretNo: 3, noteName: ‘C’}
4: {stringNo: 2, stringName: ‘D’, fretNo: 3, noteName: ‘F’}
5: {stringNo: 3, stringName: ‘G’, fretNo: 2, noteName: ‘A’}
7: {stringNo: 4, stringName: ‘B’, fretNo: 1, noteName: ‘C’}
8: {stringNo: 5, stringName: ‘E’, fretNo: 1, noteName: ‘F’}

F-Chord according to Fender - which is simpler than Justin’s:
4: {stringNo: 2, stringName: ‘D’, fretNo: 3, noteName: ‘F’}
5: {stringNo: 3, stringName: ‘G’, fretNo: 2, noteName: ‘A’}
7: {stringNo: 4, stringName: ‘B’, fretNo: 1, noteName: ‘C’}
All other strings muted

I did something similar with a spreadsheet a couple years ago. I wanted to look at the reason we like certain combinations. In the end I didn’t really figure out any algorithm for it. Instead the sheet is a handy tool for me when I want to know frequency, triad, scales, and the like. It helped me remember a few things I see other folks struggle with remembering. All in all a good exercise.

I looked at harmonic content, sub-harmonic content, intermodulation, beat notes, blah, blah… This is still ongoing for me with an eye toward amp design, but I did not YET come up with any math to describe what we enjoy hearing.

@sequences : hello, fellow nerd!

So - coming from a scientific background - I tried to understand the nature of notes also by digging into frequencies first. That was helpful, but not for this topic, I guess.

I just accept that triads sound harmonic and do not question why for now. I also like that triads can be calculated algorithmically :slight_smile:

What bothers me is that those triads can be expressed with many different chord combinations for the same root note.
How do I know which notes to choose from all possible fret positions? Why does fender have a different approach to Justin?
Is this just “subjective” or is there an optimal (algorithmic) solution?

Hi Chris - You should sign up to Justin’s practical music theory course, it will cover this sort of thing in a lot of detail.
For an F Major chord, any F, A and C
(root, major third and fifth of the scale) will give you the chord. However you’ll get very different voicings, for example a ‘normal’ major chord would have the root (F in this case) in the bass. Having the A or C as the bass note gives you a first or second inversion.
Which is right? Well whichever sounds best in the context you are using it. The ones Justin talks about are typically the most useful both in terms of sound, playability and in the case of F at the first fret, movable - if you use the open A string then it’s much harder to move that shapre up the neck to get and F#, G etc.
BTW, technically the 4th note of the F major scale is Bb not A# as you want one of each letter name in the scale and you already have an A.
Cheers
Paul.

1 Like

@mathsjunky : “Maths Junky” sounds promising for an algorithmic approach ^^

So I looked at the freely available practical music theory course from Justin. It is very good (like all content of Justin Guitars) - but it is practical, not theoretical enough. Looked around on the internet, read two books about chord construction. But every book/article seems to stop just before it’s getting interesting.

I understand (theoretically) how chords are constructed. I just do not understand, which chord pattern to choose from all available patterns - and which notes to omit from those patterns.

Again, for playing guitar it’s just “MEMORIZE THE D@MN CHORDS!” :slight_smile:

This is more a vanity project to understand chords on a “blue pill” level…

I’m a pure mathematician by training :slight_smile:

Which shape to choose? - assuming you are only talking about triads (just a 1, 3, 5) then that’s not really a theory question any more. You think about which sounds best in the progression you are playing, which is easiest to move to from your current position, which will work best with the rest of the track/band (perhaps something in a higher register won’t clash with the bass or keyboards for example). There’s often more than one that will work, having some ‘standard’ shapes in the bag is a good place to start.

Hi, the short answer is that chord shapes become popular because they are easy to play, they sound particularly good, they lend themselves to variations, adding additional notes, etc. Lots of practical reasons. Also, chord voicings (i.e. the exact notes that are played) are often chosen such that the lowest note played is the root not (not always, though!)

I’m pretty nerdy, too, so I’ll make some additional comments :smiley:

  1. First of all, I suggest you number the strings conventionally, instead of 0-5 starting on the low E string, from 1-6 starting on the high E string.

  2. Justin’s version is an (E-shape) F barre chord. That is the basic “standard” F-chord (in some sense).

  3. Fender’s chord (where did you get that, btw?): is a triad played on strings 2-4, I suppose it’s the simplest possible version of the F-chord.

4). Your “simplified” version could also be written 10x21x. While this is an F-chord, it’s not really any easier to play than the full barre chord and, unlike the barre chord, it’s not movable, because it contains a open string. (The triad version is also movable, and is actually a subset of the full barre chord).

Btw, there are many other F chords around the guitar neck, but you have only considered F, A and C notes in the first 5 frets.

1 Like

So, I just had a discussion with my girl friend and tried to explain what I am doing.

I said that there need to be two criteriia for selection of the “right” chord pattern/shape:

  • Qualitative: which translates to your statement “which sounds best”
  • Practical: which translates to your statement “which is easiest”

To minimize results for possible chord shapes, I guess that an algorithm to choose simple chords should be easy (except for omitting shapes with “strange” finger positions).

To further minimize results based on qualitative properties, I have no real idea yet. Sometimes a chord with more notes is better (because: sounds fuller?) than a simple chord with just three notes.

To find out the qualitative part I will takle the advice of my girlfriend: “just play the damn chords and listen!”.
Still it might be just a matter of taste or “which will work best with the rest of the track/band”…

1 Like

@FlyingDutchman66
Hello Chris and welcome to the community ,plus, welcome to the wonderful world of theory.
I love it! :slight_smile:

There is no such scale. You can not have the same alphabetic letter name appear twice. A# would need to be written as Bb for the F major scale.

Chords don’t belong to Justin or Fender. They just exist! :wink:

It would help us interpret your work if you renamed your strings.
thickest = string 6 (not 0)
thinnest = string 1 (not 5)

Follow the theory course until you reach chord construction - stacking in thirds.
Also, the CAGED system explains the shapes - at least the rudiments.

There’s not really an algorithm for that.

Most of the common chords in books and used by guitar players are chosen because they fit easily (or relatively so) under the fingers with standard tuning. The Fender ones won’t actually be dissimilar from Justin’s.

Many chords will double up notes, but some will just have simple triads. Which selection (or omissions) are best is not an algorithm thing, but a taste thing: if it fits into the song well then it can be used. Sometimes there are artistic or musical reasons fro choosing one formation of notes to use in a chord over a different one. Sometimes it is arbitrary.

Cheers,

Keith

@jjw : thanks!

Yes, I need to change the numbering/naming. Currently it shows programmatic positions in arrays (readable for nerds), not positions on the neck (readable for musicians).

The Fender F-chord can be found here: https://www.fender.com/articles/chords/learn-how-to-play-f-chord-on-guitar

Thanks for the statement "it’s not really any easier to play than the full barre chord and, unlike the barre chord, it’s not movable, because it contains a open string. " I will make “movability” part of the algorithm…

“there are many other F chords around the guitar neck, but you have only considered F, A and C notes in the first 5 frets.” - will review my programm and correct! If I remember correctly I progarmmed the algorithm in a way that the root note is always first. So “lowest note played is the root note”. That leads to omitting the higher (sounding) strings as a root note base for creating a shape.

@Richard_close2u : will correct in the next version!

@Majik: of course I understand that the nature of music is sometimes “arbitrary” - which translates to “wonderful” in many cases (coming from bass guitar, I have to think about Les Claypool from Primus here).
But again, for me it’s just an intellectual exercise for my little gray cells to see how far I can get, choosing a reduced set of possible shapes, based on clearly defined criteria: quality, practicability and movability (for now).

I think there’s two programming problems you are trying to solve here and, personally, I would break it down this way (working on the Single Concern Principle):

  1. Identifying the notes in a given chord. You can do that for simple triads and quadads based on fairly basic theory around how scales are constructed, and how chords are derived from them.

  2. Once you know the notes, finding them on the fretboard. The basis of this could really just be a simple algorithm to calculate all possible fret positions for each note based on standard tuning.

But then adding in things like missed strings, inversions, and the fact that you want to keep fretted strings within (say) 5 frets to make them practical.

Plus you can use open notes, and you have to consider you can have a maximum of one note per string, but you can sometimes double up notes in a chord, although other times you may wish to stick to simple triads.

As an added exercise, you could make it calculate chord shapes for alternative tunings.

Of course,.all of this is telling you what you can do (which is highly practical, and if this exercise helps you learn that, then it’s valuable). And you’ll need to acquire some music theory along the way.

I’m not sure it will help at all with the why aspect of music.

Cheers,

Keith

@Majik

  • Identifying the notes in a given chord: done
  • finding them on the fretboard: done
  • missed strings, inversions: don’t understand. Can you explain?
  • keep fretted strings within (say) 5 frets to make them practical: done
  • you can have a maximum of one note per string: done
  • double up notes in a chord, although other times you may wish to stick to simple triads: when to do what? This is one of my main challenges!
  • you can use open notes: done. In fact I consider all options, but prefer open notes currently. This might an issue when considering “movability” of shapes, right?
  • alternative tunings: I will stick to standard tuning first, to keep things simple. Maybe I will do more complicated stuff later, but remember, this is just to understand the nature of playable chords. It is more important to spend time with actually playing guitar :slight_smile:

And: I have this strange feeling that I ended up in acquiring music theory already! I know more now about it than a few hours ago…

Some chords don’t use all the strings. For instance, open D and A, and all barre chords with the root on the 5th string.

Some chords may, optionally, miss strings which are in the chord, but are commonly not played.

Yes, but sometimes it’s useful. A configuration option might be the thing here, as with other items.

Absolutely.

Then it’s a useful exercise.

By the way, there are apps which already do what you are doing, and some of them are pretty advanced. Maybe it’s worth checking some them out. For instance

Cheers,

Keith

@Majik

  • Some chords don’t use all the strings. For instance, open D and A, and all barre chords with the root on the 5th string: why?
  • Some chords may, optionally, miss strings which are in the chord, but are commonly not played: why?

About the app: yeah, I have seen those, thank you!
But using an app just gives me the results. I want to understand the process behind getting the results.

Everything I do not understand I try to express as an algorithm, Except for the meaning of life, love and the Grand Unified Theory (the latter not for lack of trying).

I’d be all over woking on this with you if I could. This work stuff gets in the way of proper fun.

Watch Justin’s G chord lesson (please find it yourself - too busy to go dig, Grade. i think). this is a good starter for the missing notes. Note the muting of string 5 for an example.

I decided to use lookup tables to define the rules rather than create an algorithm purely mathematical. It was bunch easier and allowed me to create simple look ups that can be extended for different scales, different tunings, etc. The end result is an image of what notes are in a triad across a 2-octave fretboard and another image of scale patterns I want to examine.
It is not fully generated yet, but it will be quick to fo that once I need a particular scale, triad, or pattern. It does not do more than give me the letter names of a chord, the image lets me examine where to find them, each letter a different color.

My engineering side doesn’t like calling harmonic notes “the same”. They frankly are not. A2(110Hz) != A3(220Hz). The letters assigned are arbitrary and the half-step increment of two of them in the more popular scales messes up the simple math you are going for. Even the 12 geometric increments we use is arbitrary as best as I can tell. In the 17 Century, they cleaned it up to be mathematically consistent, but there is a lot of history I hope to read about once I retire and have time to do so.

Good luck. :wink:

@sequences - Lookup tables are not the solution, as those use just dictionairies of pregenerated shapes. So they give me no insight in the actual mechanisms at work.

PS I used " The Guitarist’s Chord Book - Over 900 Guitar Chord Diagrams" by Peter Vogl to get an overview of possible chords and use those to reconstruct them algorithmically. Maybe this is helpful to you…

yep. note that I said arbitrary above. :wink:

Also, this is why I was interested in the WHY behind what we find musically pleasing. I didn’t come up with a closed solution, so let’s see what you can come up with!

I choose to view chords as living in the geometry wing of the math estate. The shapes are moveable, and all you have to do (but not always) is know the root note (that derives the chord) and then move it up and/or down the neck according to the appropriate interval. There, I either simplified or complicated the whole dang thing. LOL

1 Like