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