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