Posted: Apr 30, 2016 6:41 pm
by John Platko
[quote][/quote]Drilling a bit deeper into the problem of deciding where to play a given set of notes on a guitar fretboard:

Asking to play a couple of octaves of: a minor blues scale, i.e. these notes:
['a,', 'c', 'd', 'dis', 'e', 'g', 'a', "c'", "d'", "ees'", "e'", "g'", "a'"]

Turning on the mechanism that tries to find the smallest fret span (no of frets not actual length) that these notes can be played on makes short work of the problem.

Here are the possible places to play those note:

a, [[5, 0], [6, 5]]
c [[5, 3], [6, 8]]
d [[4, 0], [5, 5], [6, 10]]
dis [[4, 1], [5, 6], [6, 11]]
e [[4, 2], [5, 7], [6, 12]]
g [[3, 0], [4, 5], [5, 10], [6, 15]]
a [[3, 2], [4, 7], [5, 12], [6, 17]]
c' [[2, 1], [3, 5], [4, 10], [5, 15], [6, 20]]
d' [[2, 3], [3, 7], [4, 12], [5, 17]]
ees' [[2, 4], [3, 8], [4, 13], [5, 18]]
e' [[1, 0], [2, 5], [3, 9], [4, 14], [5, 19]]
g' [[1, 3], [2, 8], [3, 12], [4, 17]]
a' [[1, 5], [2, 10], [3, 14], [4, 19]]

Playing them on frets 5 to 8 is shorter fretboard span than playing them on 1 to 5. So the solution falls out:

a, [[6, 5]]
c [[6, 8]]
d [[5, 5]]
dis [[5, 6]]
e [[5, 7]]
g [[4, 5]]
a [[4, 7]]
c' [[3, 5]]
d' [[3, 7]]
ees' [[3, 8]]
e' [[2, 5]]
g' [[2, 8]]
a' [[1, 5]]

And in general I find I get decent solutions to where to play notes. But if you take an example like: play a couple of octaves of A Dorian scale from a, to a' . i.e. these notes:

['a,', 'a,', 'b', 'c', 'd', 'e', 'fis', 'g', 'a', 'b', "c'", "d'", "e'", "fis'", "g'", "a'"]

then LickMaker has these places to choose from to play those notes:

a, [[5, 0], [6, 5]]
a, [[5, 0], [6, 5]]
ces [[5, 2], [6, 7]]
c [[5, 3], [6, 8]]
d [[4, 0], [5, 5], [6, 10]]
e [[4, 2], [5, 7], [6, 12]]
fis [[4, 4], [5, 9], [6, 14]]
g [[3, 0], [4, 5], [5, 10], [6, 15]]
a [[3, 2], [4, 7], [5, 12], [6, 17]]
b [[2, 0], [3, 4], [4, 9], [5, 14], [6, 19]]
c' [[2, 1], [3, 5], [4, 10], [5, 15], [6, 20]]
d' [[2, 3], [3, 7], [4, 12], [5, 17]]
e' [[1, 0], [2, 5], [3, 9], [4, 14], [5, 19]]
fis' [[1, 2], [2, 7], [3, 11], [4, 16]]
g' [[1, 3], [2, 8], [3, 12], [4, 17]]
a' [[1, 5], [2, 10], [3, 14], [4, 19]]

If you select for the shortest fretboard fret spacing length then it quickly finds:

[[6, 5], [6, 5], [5, 2], [5, 3], [5, 5], [4, 2], [4, 4], [4, 5], [3, 2], [3, 4], [3, 5], [2, 3], [2, 5], [1, 2], [1, 3], [1, 5]]

If you turn that off and let it rely on its genetic heuristic then it finds:

[[6, 5], [6, 5], [6, 7], [5, 3], [5, 5], [5, 7], [4, 4], [4, 5], [4, 7], [3, 4], [3, 5], [3, 7], [2, 5], [2, 7], [1, 3], [1, 5]]

Both of which are not bad, in fact they may be fine solutions but they may not be what comes to mind when a guitar player thinks of A Dorian. Guitar players tend to learn patterns to play scales in. If you know 5 patterns and know how to move them around a fretboard then you can play any mode in any Major or minor key. But in the above examples, lickmaker wasn't concerned about how a guitar player might use patterns to help them figure out how to play a given scale- it was just trying to group the notes as it thought best.

Thinking about this I thought I'd add the notion of the 5 patterns that guitar players often use - I call it the CAGED system- it goes by other names and people don't label the patterns the same way. Sometimes the patterns are a bit different, etc. etc.

But I showed lickmaker the 5 patterns I tend to use- not linking the patterns to any key or mode (perhaps I'll do that at some point) and added a bonus to the genertic heuristics fitness function if the notes are played in a way that one of these patterns can be used.

With the pattern bonus in effect, lickmaker decided to play A Dorian notes in these positions:

[[6, 5], [6, 5], [6, 7], [6, 8], [5, 5], [5, 7], [4, 4], [4, 5], [4, 7], [3, 4], [3, 5], [3, 7], [2, 5], [2, 7], [2, 8], [1, 5]]

Which is more to my liking if no other factors are in play.