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