All Possible Fretboard Positions

tl;dr: The fretting program on github.

IncorrectguitarpositionFor a while now, I have been burning with a desire to see (and practice) every playable guitar fingering position, in a mathematical (not musical chord based) order, for any arrangement of fingers.

This is a combinatorial problem of enumerating the “variations with repetition” but excluding those that are physically impossible to play.

As a programmer, it is exciting to feel “my brain on logic” and in this case, it has been in implementing the rules to flag “unplayable” positions.

Given the above code, here is the main loop, that inspects fret groups and joins them with the finger symbols:

First here, we flag unplayable fingerings with two rules:

  1. Lower fingers on higher frets and higher fingers on lower frets are not allowed.
  2. Frets can’t be more than the allowed finger span.

When an unplayable fingering is seen, we skip to the next position (unless we are accumulating all the flags).

In order to facilitate “infraction detection” while allowing one or two fret finger spans, I created a function that uses an “adjacent finger span list.”

This is the output for three fingers in ascending order (i.e. i=index, m=middle, a=ring), covering the first three frets, plus the open string:

Here are three fingers, in different order, on four frets with no open strings:

Note the familiar lexicographic enumeration, but without impossible spans (for the average hand) or backward fingerings.

Next up: Diagrams!