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