]> git.donarmstrong.com Git - lilypond.git/blob - input/tricks/beam-dir-function.ly
patch::: 1.3.144.jcn6
[lilypond.git] / input / tricks / beam-dir-function.ly
1
2 \header{
3 texidoc="
4 There are several ways to calculate the direction of a beam
5
6 @table @samp
7 @item majority
8 number count of up or down notes
9 @item mean
10 mean centre distance of all notes
11 @item median
12 mean centre distance weighted per note
13 @end table
14
15 We should see:
16
17   up down down
18
19   up up down
20 ";
21 }
22
23 \score {
24   \notes \relative c'' {
25     % the default
26     %\property Voice.Beam \set #'dir-function = #beam-dir-majority
27     [d8 a]
28     \property Voice.Beam \set #'dir-function = #beam-dir-mean
29     [d a] 
30     \property Voice.Beam \set #'dir-function = #beam-dir-median
31     [d a]
32     
33     \property Voice.Beam \set #'dir-function = #beam-dir-majority
34     \time 3/8;
35     [d8 a a]
36     \property Voice.Beam \set #'dir-function = #beam-dir-mean
37     [d a a] 
38     \property Voice.Beam \set #'dir-function = #beam-dir-median
39     [d a a] 
40   }
41 }