]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/how-to-change-fret-diagram-position.ly
a00bb0ff3ef7cfe309f2cc736fcd5cfef1a08cc1
[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.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.14.2"
8
9 \header {
10   lsrtags = "specific-notation, tweaks-and-overrides, fretted-strings"
11
12 %% Translation of GIT committish: 57f9346bb030f49336a858fcbf1519366fe56454
13   texidocfr = "
14 Différents moyens permettent de repositionner un diagramme de fret pour
15 éviter des collisions ou le placer entre deux notes :
16
17 -- La modification des valeurs de @code{#'padding} ou de
18    @code{#'extra-offset}comme pour le second diagramme;
19
20 -- L'adjonction d'une voix invisible dans laquelle les diagrammes sont
21    attachés à des notes invisibles comme pour le troisième diagramme.
22
23 Lorsque le diagramme doit correspondre à une position rythmique dans la
24 mesure,  comme au troisième temps de la deuxième mesure, la seconde
25 méthode est plus appropriée, puisque le diagramme sera aligné sur le
26 temps.
27
28 "
29   doctitlefr = "Repositionnement d'un diagramme de fret"
30
31   texidoc = "
32 If you want to move the position of a fret diagram, for example, to
33 avoid collision, or to place it between two notes, you have various
34 possibilities:
35
36 1) modify #'padding or #'extra-offset values (as shown in the first
37 snippet)
38
39 2) you can add an invisible voice and attach the fret diagrams to the
40 invisible notes in that voice (as shown in the second example).
41
42  If you need to move the fret according with a rythmic position inside
43 the bar (in the example, the third beat of the measure) the second
44 example is better, because the fret is aligned with the third beat
45 itself.
46
47 "
48   doctitle = "How to change fret diagram position"
49 } % begin verbatim
50
51
52 harmonies = \chordmode
53 {
54   a8:13
55 % THE FOLLOWING IS THE COMMAND TO MOVE THE CHORD NAME
56   \once \override ChordNames.ChordName #'extra-offset = #'(10 . 0)
57   b8:13 s2.
58 % THIS LINE IS THE SECOND METHOD
59     s4 s4  b4:13
60 }
61
62 \score
63 {
64   <<
65     \context ChordNames \harmonies
66     \context Staff
67     {a8^\markup { \fret-diagram  #"6-x;5-0;4-2;3-0;2-0;1-2;"  }
68 % THE FOLLOWING IS THE COMMAND TO MOVE THE FRET DIAGRAM
69      \once \override TextScript #'extra-offset = #'(10 . 0)
70      b4.~^\markup { \fret-diagram  #"6-x;5-2;4-4;3-2;2-2;1-4;"  } b4. a8\break
71 % HERE IS THE SECOND METHOD
72      <<
73        { a8 b4.~ b4. a8}
74        { s4 s4 s4^\markup { \fret-diagram  #"6-x;5-2;4-4;3-2;2-2;1-4;"  }
75        }
76      >>
77    }
78   >>
79 }
80
81
82