]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/learning/tweaks.itely
make \shiftOff an assertive \override, not a \revert
[lilypond.git] / Documentation / learning / tweaks.itely
index b7597087080c33bce6e503cd78e735fdf6990bef..db99e027c8e7ac8b4bfe8cdf8f025a7096b475c5 100644 (file)
@@ -3209,18 +3209,26 @@ do this, see @ruser{Modifying ties and slurs}.
 Here's a further example.  We see that the beams
 collide with the ties:
 
-@lilypond[quote,verbatim,fragment,ragged-right]
+@lilypond[quote,verbatim,fragment,ragged-right,relative=1]
 {
   \time 4/2
   <<
-    { c'1 ~ 2. e'8 f' }
+    { c1~ 2. e8 f }
     \\
-    { e''8 e'' e'' e''  e'' e'' e'' e''  f''2 g'' }
+    {
+      e'8 e e e
+      e e e e
+      f2 g
+    }
   >>
   <<
-    { c'1 ~ 2. e'8 f' }
+    { c,,1~ 2. e8 f }
     \\
-    { e''8 e'' e'' e''  e'' e'' e'' e''  f''2 g'' }
+    {
+      e'8 e e e
+      e e e e
+      f2 g
+    }
   >>
 }
 @end lilypond
@@ -3233,29 +3241,37 @@ say, 1:
 @cindex Beam, example of overriding
 @cindex positions property, example
 
-@lilypond[quote,verbatim,fragment,ragged-right]
+@lilypond[quote,verbatim,ragged-right,relative=1]
 {
   \time 4/2
   <<
-    { c'1 ~ 2. e'8 f' }
+    { c1~ 2. e8 f }
     \\
     {
       \override Beam.positions = #'(-1 . -1)
-      e''8 e'' e'' e''  e'' e'' e'' e''  f''2 g''
+      e'8 e e e
+      e e e e
+      f2 g
     }
   >>
   <<
-    { c'1 ~ 2. e'8 f' }
+    { c,,1~ 2. e8 f }
     \\
-    { e''8 e'' e'' e''  e'' e'' e'' e''  f''2 g'' }
+    {
+      e'8 e e e
+      e e e e
+      f2 g
+      \revert Beam.positions
+    }
   >>
 }
 @end lilypond
 
 @noindent
-Note that the override continues to apply in the first voice of
+Note that the override continues to apply in the second voice of
 the second measure of eighth notes, but not to any of the beams in the
-second voice.
+first voice, even those in the later second measure.  As soon as the
+override should no longer apply it should be reverted, as shown.
 
 @node The force-hshift property
 @unnumberedsubsubsec The @code{force-hshift} property
@@ -3282,10 +3298,7 @@ was left looking like this:
 @noindent
 The inner note of the first chord (i.e. the A-flat in the fourth
 Voice) need not be shifted away from the note column of the higher
-note.  We might expect to correct this by using @code{\shiftOff}, but
-this will cause warnings about clashing note columns.  Instead, we
-set @code{force-hshift}, which is a property of @code{NoteColumn},
-of this note to zero.
+note, so we use @code{\shiftOff}.
 
 In the second chord we prefer the F to line up with the A-flat and
 the lowest note to be positioned slightly right to avoid a collision
@@ -3311,8 +3324,7 @@ Here's the final result:
     { <ees, c>2 \once \override NoteColumn.force-hshift = 0.5 des }
     \\
     \\
-    { \once \override NoteColumn.force-hshift = 0 aes'2
-      \once \override NoteColumn.force-hshift = 0 f4 fes }
+    { \once \shiftOff aes'2 \once \shiftOff f4 fes }
   >> |
   <c ees aes c>1 |
 }