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