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

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