]> git.donarmstrong.com Git - lilypond.git/blob - input/test/auto-beam.ly
patch::: 1.1.22.jcn5: autobiem
[lilypond.git] / input / test / auto-beam.ly
1 %{
2   Currently (1.1.22.jcn5), the auto-beam engraver will only engrave
3   sensible beams (hopefully), which means that it will give up the
4   whole beam if:
5     * a rest is encountered
6     * another beam (entered manually) is encountered
7     * there's a 'gap' in the beam note's durations
8
9   There's no smart algorithm, beginning a beam is considered when
10    
11     now / beamAutoBegin = 0
12
13   the beam will be ended when
14
15     * now / beamAutoEnd = 0
16 %}
17         
18 \score{
19     \notes \relative c''{
20         \time 2/4;
21         % one beam per measure
22         c8 c c c
23         % two beams per measure
24         \property Voice.beamAutoBegin = "0.25"
25         \property Voice.beamAutoEnd = "0.25"
26         c8 c c c
27         % manually override autobeam with weird beaming
28         c8 [c c] c
29         c8 c c r
30         c8 c c4
31         r8 c c c
32         % no autobeaming
33         \property Voice.beamAuto = "0"
34         c8 c c c
35     }
36     \paper{
37         \translator{
38             \VoiceContext
39             % add experimental auto-beaming
40             \consists Auto_beam_engraver;
41             % switch it on (perhaps a bit double, but we want to be able 
42             % to switch it off conveniently
43             beamAuto = 1.;
44             % consider starting beam at every 4 note
45             % would be nice if we could enter durations here, e.g.:
46             % what if we make 'dur (4)' a real_expression?
47             beamAutoBegin = 0.5;
48             beamAutoEnd = 0.5;
49         }
50     }
51 }