]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4452/2: Fix uses of \context Staff alongside ChordNames context
authorDavid Kastrup <dak@gnu.org>
Mon, 15 Jun 2015 17:34:37 +0000 (19:34 +0200)
committerDavid Kastrup <dak@gnu.org>
Sat, 20 Jun 2015 11:06:06 +0000 (13:06 +0200)
Documentation/notation/cheatsheet.itely
Documentation/snippets/new/how-to-change-fret-diagram-position.ly [new file with mode: 0644]
input/regression/chord-changes.ly
input/regression/chords-funky-ignatzek.ly

index 8b895bd902db0476ce1c3b74206e1d03e474094b..20a258a3592fda0f5ee04b5cebcdc2b5d0a0fc38 100644 (file)
@@ -276,7 +276,7 @@ twinkle
 \chordmode { c:dim f:maj7 }
 @end lilypond
 
-@item @code{\context ChordNames}
+@item @code{\new ChordNames}
 @tab printing chord names
 @tab
 @lilypond[relative=2]
diff --git a/Documentation/snippets/new/how-to-change-fret-diagram-position.ly b/Documentation/snippets/new/how-to-change-fret-diagram-position.ly
new file mode 100644 (file)
index 0000000..39cf3cf
--- /dev/null
@@ -0,0 +1,52 @@
+\version "2.19.22"
+
+\header {
+  lsrtags = "fretted-strings, specific-notation, tweaks-and-overrides"
+
+  texidoc = "
+If you want to move the position of a fret diagram, for example, to
+avoid collision, or to place it between two notes, you have various
+possibilities:
+
+1) modify #'padding or #'extra-offset values (as shown in the first
+snippet)
+
+2) you can add an invisible voice and attach the fret diagrams to the
+invisible notes in that voice (as shown in the second example).
+
+ If you need to move the fret according with a rythmic position inside
+the bar (in the example, the third beat of the measure) the second
+example is better, because the fret is aligned with the third beat
+itself.
+
+"
+  doctitle = "How to change fret diagram position"
+}
+harmonies = \chordmode
+{
+  a8:13
+% THE FOLLOWING IS THE COMMAND TO MOVE THE CHORD NAME
+  \once \override ChordNames.ChordName.extra-offset = #'(10 . 0)
+  b8:13 s2.
+% THIS LINE IS THE SECOND METHOD
+    s4 s4  b4:13
+}
+
+\score
+{
+  <<
+    \new ChordNames \harmonies
+    \new Staff
+    {a8^\markup { \fret-diagram  #"6-x;5-0;4-2;3-0;2-0;1-2;"  }
+% THE FOLLOWING IS THE COMMAND TO MOVE THE FRET DIAGRAM
+     \once \override TextScript.extra-offset = #'(10 . 0)
+     b4.~^\markup { \fret-diagram  #"6-x;5-2;4-4;3-2;2-2;1-4;"  } b4. a8\break
+% HERE IS THE SECOND METHOD
+     <<
+       { a8 b4.~ b4. a8}
+       { s4 s4 s4^\markup { \fret-diagram  #"6-x;5-2;4-4;3-2;2-2;1-4;"  }
+       }
+     >>
+   }
+  >>
+}
index 8e308c8a0e14484f138da03de7edb2db87696d17..a662e4efc400304735ea649e35eadf80de6354d6 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.19.22"
 
 \header{
   texidoc="Property chordChanges: display chord names only when
@@ -19,10 +19,10 @@ settings = {
 }
 
 <<
-  \context ChordNames <<
+  \new ChordNames <<
     \scheme
     \set chordChanges = ##t
   >>
-  \context Staff \transpose c c' \scheme
+  \new Staff \transpose c c' \scheme
 >>
 
index b450dfcb7e020dafcb36b17d4535d8ba88d1d77b..ac1d5f263ade36b96323c4a0c919af10368a99bf 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.19.22"
 
 
 \header {
@@ -26,9 +26,9 @@ chs =
 
 
 <<
-  \context ChordNames {
+  \new ChordNames {
     %% #(set-chord-name-style 'ignatzek)
     \chs
   }
-  \context Staff  \transpose c c' { \chs }
+  \new Staff  \transpose c c' { \chs }
 >>