]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/how-to-change-fret-diagram-position.ly
LSR import
[lilypond.git] / Documentation / snippets / how-to-change-fret-diagram-position.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.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.18.0"
8
9 \header {
10   lsrtags = "fretted-strings, specific-notation, tweaks-and-overrides"
11
12   texidoc = "
13 If you want to move the position of a fret diagram, for example, to
14 avoid collision, or to place it between two notes, you have various
15 possibilities:
16
17 1) modify #'padding or #'extra-offset values (as shown in the first
18 snippet)
19
20 2) you can add an invisible voice and attach the fret diagrams to the
21 invisible notes in that voice (as shown in the second example).
22
23  If you need to move the fret according with a rythmic position inside
24 the bar (in the example, the third beat of the measure) the second
25 example is better, because the fret is aligned with the third beat
26 itself.
27
28 "
29   doctitle = "How to change fret diagram position"
30 } % begin verbatim
31
32 harmonies = \chordmode
33 {
34   a8:13
35 % THE FOLLOWING IS THE COMMAND TO MOVE THE CHORD NAME
36   \once \override ChordNames.ChordName.extra-offset = #'(10 . 0)
37   b8:13 s2.
38 % THIS LINE IS THE SECOND METHOD
39     s4 s4  b4:13
40 }
41
42 \score
43 {
44   <<
45     \new ChordNames \harmonies
46     \new Staff
47     {a8^\markup { \fret-diagram  #"6-x;5-0;4-2;3-0;2-0;1-2;"  }
48 % THE FOLLOWING IS THE COMMAND TO MOVE THE FRET DIAGRAM
49      \once \override TextScript.extra-offset = #'(10 . 0)
50      b4.~^\markup { \fret-diagram  #"6-x;5-2;4-4;3-2;2-2;1-4;"  } b4. a8\break
51 % HERE IS THE SECOND METHOD
52      <<
53        { a8 b4.~ b4. a8}
54        { s4 s4 s4^\markup { \fret-diagram  #"6-x;5-2;4-4;3-2;2-2;1-4;"  }
55        }
56      >>
57    }
58   >>
59 }