Jump to content

Creating guitar scales on fretboards: Difference between revisions

From LilyPond wiki
m New category
Taifas (talk | contribs)
d ionic: d e f-sharp g ...
Tags: Mobile edit Mobile web edit
Line 74: Line 74:
\relative c' {
\relative c' {
   c  d^\cmajor e f g^"c Ionic"      a b c d e f g a b c r | \break
   c  d^\cmajor e f g^"c Ionic"      a b c d e f g a b c r | \break
   d,, e^\dmajor f g a^"d Ionic"      b c d e f g a b c d r | \break
   d,, e^\dmajor fs g a^"d Ionic"      b c d e f g a b c d r | \break
   c,, d^\cpenta f g a^"c pentatonic" a c d f g a c        |
   c,, d^\cpenta f g a^"c pentatonic" a c d f g a c        |
}
}

Revision as of 08:56, 1 March 2026

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

LilyPond rendering error

LilyPond log:
Running as unit: run-p1009075-i5202931.service; invocation ID: 5a0b4930524644a09bde5fea5b759ef8
Changing working directory to: `/tmp/lilywiki-tmp977e40fbad'
Processing `/tmp/lilywiki-tmp977e40fbad/file.ly'
Parsing...
/tmp/lilywiki-tmp977e40fbad/file.ly:56:17: error: not a note name: fs
  d,, e^\dmajor
                fs g a^"d Ionic"      b c d e f g a b c d r | \break
Interpreting music...[8]
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `file.svg'...
fatal error: failed files: "/tmp/lilywiki-tmp977e40fbad/file.ly"