Fret diagrams - GNU LilyPond
Description: GNU LilyPond

Next: Other guitar issues, Previous: Banjo tablatures, Up: Guitar

#### 7.5.5 Fret diagrams

Fret diagrams can be added to music as a markup to the desired note. The markup contains information about the desired fret diagram, as shown in the following example

>          \new Voice {
>            d'^\markup \fret-diagram #"6-x;5-x;4-o;3-2;2-3;1-2;"
>            d' d' d'
>            fis'^\markup \override #'(size . 0.75) {
>              \override #'(finger-code . below-string) {
>                \fret-diagram-verbose #'((place-fret 6 2 1) (barre 6 1 2)
>                                         (place-fret 5 4 3) (place-fret 4 4 4)
>                                         (place-fret 3 3 2) (place-fret 2 2 1)
>                                         (place-fret 1 2 1))
>              }
>            }
>            fis' fis' fis'
>            c'^\markup \override #'(dot-radius . 0.35) {
>              \override #'(finger-code . in-dot) {
>                \override #'(dot-color . white) {
>                  \fret-diagram-terse #"x;3-1-(;5-2;5-3;5-4;3-1-);"
>                }
>              }
>            }
>            c' c' c'
>          }

There are three different fret-diagram markup interfaces: standard, terse, and verbose. The three interfaces produce equivalent markups, but have varying amounts of information in the markup string. Details about the markup interfaces are found at Overview of text markup commands.

You can set a number of graphical properties according to your preference. Details about the property interface to fret diagrams are found at fret-diagram-interface.

##### See also

Examples: `input/test/fret-diagram.ly`

This page is for LilyPond-2.8.8 (stable-branch).

Other languages: English.
Using automatic language selection.