]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/beam-dir-function.ly
*** empty log message ***
[lilypond.git] / input / test / beam-dir-function.ly
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..40c3893ca0c18376a6da383d5fc185c1cf7b897c 100644 (file)
@@ -0,0 +1,42 @@
+\version "1.5.68"
+
+\header{
+texidoc="
+
+There are several ways to calculate the direction of a beam
+
+@table @samp
+@item majority
+number count of up or down notes
+@item mean
+mean centre distance of all notes
+@item median
+mean centre distance weighted per note
+@end table
+
+We should see:
+
+  up down down
+
+  up up down
+"
+}
+
+\score {
+  \notes \relative c'' {
+    \property Voice.Beam \set #'dir-function = #beam-dir-majority
+    [d8 a]
+    \property Voice.Beam \set #'dir-function = #beam-dir-mean
+    [d a] 
+    \property Voice.Beam \set #'dir-function = #beam-dir-median
+    [d a]
+    
+    \property Voice.Beam \set #'dir-function = #beam-dir-majority
+    \time 3/8
+    [d8 a a]
+    \property Voice.Beam \set #'dir-function = #beam-dir-mean
+    [d a a] 
+    \property Voice.Beam \set #'dir-function = #beam-dir-median
+    [d a a] 
+  }
+}