Creating guitar scales on fretboards

This snippet creates fretboards with guitar scales.

The syntax is

\scale-diagramm #'( (string1 fret1) (string2 fret2) ... ) #notesinscale #size

For example for a c pentatonic scale (first six notes)

\scale-diagramm #'((5 3) (5 5 ) (4 3) (4 5) (3 2) (3 5)) #5 #1.5

you can wrap this up in a markup command for building up a list of scales

cpenta = \markup \scale-diagramm #'((5 3) (5 5 ) (4 3) (4 5) (3 2) (3 5)) #5 #1.5

and use it like this

c^\cpenta d f g a c

The snippet doesn't show it, but the (1) position of the scale is inverted