]> git.donarmstrong.com Git - lilypond.git/blob - input/test/beam-dir-functions.ly
613eec4d510c548ad499567573e316f1186e6bfb
[lilypond.git] / input / test / beam-dir-functions.ly
1 \header {
2 texidoc = "
3
4 There are several ways to calculate the direction of a beam.
5 @table @code
6 @item majority
7 number count of up or down notes
8 @item mean
9 mean center distance of all notes
10 @item median
11 mean centre distance weighted per note
12 @end table
13
14 You can spot the differences of these settings from these simple
15 examples:
16
17 These beam direction functions are defined in @file{scm/beam.scm}.  If
18 your favourite algorithm isn't one of these, you can hook up your own.
19 ";
20 }
21
22 \paper { linewidth = -1.;}
23 \score { \notes \relative c { 
24   [d''8 a]
25   \property Voice.Beam \set #'dir-function = #beam-dir-mean
26   [d a] 
27   \property Voice.Beam \set #'dir-function = #beam-dir-median
28   [d a]
29 }}
30 \score { \notes \relative c {
31   \time 3/8;
32   [d''8 a a]
33   \property Voice.Beam \set #'dir-function = #beam-dir-mean
34   [d a a] 
35   \property Voice.Beam \set #'dir-function = #beam-dir-median
36   [d a a] 
37 }}
38