What's this? Searching the LSR Browse by date Contributing Snippet database | Browsing items 280−289 out of 949 |
This snippet shows how to create fret diagrams with chord names but no staff/staves, for a fret diagram which is not one of the predefined fretboard diagrams i.e. with the fret diagrams specified using fret diagram markup.
The first example in the "Fret diagram markups" section of the "Notation Reference" (http://lilypond.org/doc/v2.18/Documentation/6f/lily-b213fdb4.ly) is defined using fret diagram markup, so I have used that example as the basis for this snippet. Hence, this is also an example of how to remove the staff (and all things in the staff) from the first example in the "Fret diagram markups" section of the "Notation reference".
For more info, please see:
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
For use in education a scheme function to display chords on a keyboard have been created.
The function is called 'keys' and it takes a list of note names as its argument. For example
\keys #'(c e g bes)
wil create a C7 chord
So far the following note names are accepted:
c, cis, des, d, ....., ais, bes, b, c', cis', des', ...., bes', b', c''
The function can be wrapped up in a markup command like this
cnine=\markup\keys #'(c e g bes d')
and be used like this
\relative c' { < c e g bes d' >^\cnine }