]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/customizing-markup-fret-diagrams.ly
Doc-fr: update for 2.16.1 (second part)
[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.16.0"
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
31       #'(fret-diagram-details finger-code) = #'in-dot
32     \override TextScript
33       #'(fret-diagram-details dot-color) = #'white
34
35     %% C major for guitar, no barre, using defaults
36        % terse style
37     c'1^\markup { \fret-diagram-terse #"x;3-3;2-2;o;1-1;o;" }
38
39     %% C major for guitar, barred on third fret
40        % verbose style
41        % size 1.0
42        % roman fret label, finger labels below string, straight barre
43     c'1^\markup {
44       % standard size
45       \override #'(size . 1.0) {
46         \override #'(fret-diagram-details . (
47                      (number-type . roman-lower)
48                      (finger-code . in-dot)
49                      (barre-type . straight))) {
50           \fret-diagram-verbose #'((mute 6)
51                                    (place-fret 5 3 1)
52                                    (place-fret 4 5 2)
53                                    (place-fret 3 5 3)
54                                    (place-fret 2 5 4)
55                                    (place-fret 1 3 1)
56                                    (barre 5 1 3))
57         }
58       }
59     }
60
61     %% C major for guitar, barred on third fret
62        % verbose style
63        % landscape orientation, arabic numbers, M for mute string
64        % no barre, fret label down or left, small mute label font
65     c'1^\markup {
66       \override #'(fret-diagram-details . (
67                    (finger-code . below-string)
68                    (number-type . arabic)
69                    (label-dir . -1)
70                    (mute-string . "M")
71                    (orientation . landscape)
72                    (barre-type . none)
73                    (xo-font-magnification . 0.4)
74                    (xo-padding . 0.3))) {
75         \fret-diagram-verbose #'((mute 6)
76                                  (place-fret 5 3 1)
77                                  (place-fret 4 5 2)
78                                  (place-fret 3 5 3)
79                                  (place-fret 2 5 4)
80                                  (place-fret 1 3 1)
81                                  (barre 5 1 3))
82       }
83     }
84
85     %% simple D chord
86        % terse style
87        % larger dots, centered dots, fewer frets
88        % label below string
89     d'1^\markup {
90       \override #'(fret-diagram-details . (
91                    (finger-code . below-string)
92                    (dot-radius . 0.35)
93                    (dot-position . 0.5)
94                    (fret-count . 3))) {
95         \fret-diagram-terse #"x;x;o;2-1;3-2;2-3;"
96       }
97     }
98   }
99 >>