]> git.donarmstrong.com Git - lilypond.git/commitdiff
Docs: NR 1.2.4 Beams: Add example with Score context
authorTrevor Daniels <t.daniels@treda.co.uk>
Tue, 4 Nov 2008 08:18:39 +0000 (08:18 +0000)
committerTrevor Daniels <t.daniels@treda.co.uk>
Tue, 4 Nov 2008 08:18:39 +0000 (08:18 +0000)
Documentation/user/rhythms.itely

index e3c9f34f8a8009da0e9a0c9f00ed3a7c91bf8fa2..91c57d4a5800c4d77f4e8becc30856cfb101b6e2 100644 (file)
@@ -1695,9 +1695,6 @@ staff:
 << {a8 a a a16 a a a a8 a} \\ {f4. f8 f f f} >>
 @end lilypond
 
-@c TODO Add example using Score for multiple staves?
-@c Hmm.  Not sure it works correctly.  Needs more investigation.
-
 @warning{If any unexpected beam behavior occurs, check the default
 automatic beam settings in @file{scm/@/auto@/-beam@/.scm} for
 possible interference, because the beam endings defined there will
@@ -1748,26 +1745,36 @@ a a a a
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
 {beam-grouping-in-7-8-time.ly}
 
-@ignore
-
-@c TODO Does this example add anything?
-
-In this
-example, automatic beams can only end on a dotted quarter note
-@example
-#(override-auto-beam-setting '(end * * * *) 3 8)
-#(override-auto-beam-setting '(end * * * *) 1 2)
-#(override-auto-beam-setting '(end * * * *) 7 8)
-@end example
+@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+{reverting-default-beam-endings.ly}
 
-In 4/4 time signature, this means that automatic beams could end only on
-3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
-3/8, has passed within the measure).
+@c TODO Convert to snippet called "Beam endings in Score context"
+@c Submitted to LSR 3 Nov 08
 
-@end ignore
+Beam-ending rules specified in the Score context apply to all
+staves, but can be modified at both Staff and Voice levels:
 
-@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-{reverting-default-beam-endings.ly}
+@lilypond[quote,verbatim,relative=2]
+  \time 5/4
+  % Set default beaming for all staves
+  #(override-auto-beam-setting '(end * * 5 4) 3 8 'Score)
+  #(override-auto-beam-setting '(end * * 5 4) 7 8 'Score)
+  <<
+    \new Staff {
+      c8 c c c c c c c c c
+    }
+    \new Staff {
+      % Modify beaming for just this staff
+      #(override-auto-beam-setting '(end * * 5 4) 6 8 'Staff)
+      #(revert-auto-beam-setting '(end * * 5 4) 7 8 'Staff)
+      c8 c c c c c c c c c
+    }
+    \new Staff {
+      % Inherit beaming from Score context
+      c8 c c c c c c c c c
+    }
+  >>
+@end lilypond
 
 
 @predefined