]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/customizing-markup-fret-diagrams.ly
Doc-fr: updates texidocs
[lilypond.git] / Documentation / snippets / customizing-markup-fret-diagrams.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.17.6"
8
9 \header {
10   lsrtags = "fretted-strings, tweaks-and-overrides"
11
12   texidoc = "
13 Fret diagram properties can be set through
14 @code{'fret-diagram-details}.  For markup fret diagrams, overrides can
15 be applied to the @code{Voice.TextScript} object or directly to the
16 markup.
17
18 "
19   doctitle = "Customizing markup fret diagrams"
20 } % begin verbatim
21
22
23 <<
24   \chords { c1 | c | c | d }
25
26   \new Voice = "mel" {
27     \textLengthOn
28     % Set global properties of fret diagram
29     \override TextScript.size = #'1.2
30     \override TextScript.fret-diagram-details.finger-code = #'in-dot
31     \override TextScript.fret-diagram-details.dot-color = #'white
32
33     %% C major for guitar, no barre, using defaults
34        % terse style
35     c'1^\markup { \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;" }
36
37     %% C major for guitar, barred on third fret
38        % verbose style
39        % size 1.0
40        % roman fret label, finger labels below string, straight barre
41     c'1^\markup {
42       % standard size
43       \override #'(size . 1.0) {
44         \override #'(fret-diagram-details . (
45                      (number-type . roman-lower)
46                      (finger-code . in-dot)
47                      (barre-type . straight))) {
48           \fret-diagram-verbose #'((mute 6)
49                                    (place-fret 5 3 1)
50                                    (place-fret 4 5 2)
51                                    (place-fret 3 5 3)
52                                    (place-fret 2 5 4)
53                                    (place-fret 1 3 1)
54                                    (barre 5 1 3))
55         }
56       }
57     }
58
59     %% C major for guitar, barred on third fret
60        % verbose style
61        % landscape orientation, arabic numbers, M for mute string
62        % no barre, fret label down or left, small mute label font
63     c'1^\markup {
64       \override #'(fret-diagram-details . (
65                    (finger-code . below-string)
66                    (number-type . arabic)
67                    (label-dir . -1)
68                    (mute-string . "M")
69                    (orientation . landscape)
70                    (barre-type . none)
71                    (xo-font-magnification . 0.4)
72                    (xo-padding . 0.3))) {
73         \fret-diagram-verbose #'((mute 6)
74                                  (place-fret 5 3 1)
75                                  (place-fret 4 5 2)
76                                  (place-fret 3 5 3)
77                                  (place-fret 2 5 4)
78                                  (place-fret 1 3 1)
79                                  (barre 5 1 3))
80       }
81     }
82
83     %% simple D chord
84        % terse style
85        % larger dots, centered dots, fewer frets
86        % label below string
87     d'1^\markup {
88       \override #'(fret-diagram-details . (
89                    (finger-code . below-string)
90                    (dot-radius . 0.35)
91                    (dot-position . 0.5)
92                    (fret-count . 3))) {
93         \fret-diagram-terse #"x;x;o;2-1;3-2;2-3;"
94       }
95     }
96   }
97 >>