]> git.donarmstrong.com Git - lilypond.git/blob - ly/auto-beam-settings.ly
50044c786e9e1306a98d94c574147f254b509e74
[lilypond.git] / ly / auto-beam-settings.ly
1 % auto-beam-settings.ly
2 % setup for auto-beam engraver
3 %
4 % specify generic beam end times
5
6 % format:
7 %
8 %     [time-signature]'beamAutoEnd'[duration]
9 %
10 % where
11 %
12 %     time-signature = 'time'[numerator]'_'denominator; eg: 3_4
13 %     duration = [numerator]'_'denominator; eg: 3_8, _16
14 %
15
16 % in 3/2 time:
17 %   end beams each 1/2 note
18 %   end beams with 16th notes each 1/4 note
19 %   end beams with 32th notes each 1/8 note
20
21
22 %{
23
24 UGH UGH. 
25
26 Fixme: should use an alist
27
28 autoBeamSettings = (list
29   (cons (list (make-moment MEASURE) TIME-SIGNATURE) (make-moment INTERVAL)
30   ..
31
32   )
33
34
35
36 %}
37
38
39
40
41
42
43
44
45
46
47 time3_2beamAutoEnd = #(make-moment 1 2)
48 %time3_2beamAutoEnd_16 = #(make-moment 1 4)
49 time3_2beamAutoEnd_16 = #(make-moment 1 4)
50 time3_2beamAutoEnd_32 = #(begin (make-moment 1 8))
51
52 time3_4beamAutoBegin_8 = #(begin (make-moment 1 4))
53 time3_4beamAutoEnd = #(begin (make-moment 3 4))
54 time3_4beamAutoBegin_16 = #(begin (make-moment 1 16))
55 time3_4beamAutoEnd_16 = #(begin (make-moment 1 4))
56 %time3_4beamAutoBegin_32 = #(begin (make-moment 1 8))
57 time3_4beamAutoEnd_32 = #(begin (make-moment 1 8))
58
59 time3_8beamAutoBegin = #(begin (make-moment 1 8))
60 time3_8beamAutoEnd = #(begin (make-moment 3 8))
61
62 % in common time:
63 %   end beams each 1/2 note
64 %   end beams with 32th notes each 1/8 note
65 %   end beams with 1/8 triplets each 1/4 note
66
67 time4_4beamAutoEnd = #(begin (make-moment 1 2))
68 time4_4beamAutoEnd_12 = #(begin (make-moment 1 4))
69 time4_4beamAutoEnd_16 = #(begin (make-moment 1 4))
70 time4_4beamAutoEnd_32 = #(begin (make-moment 1 8))
71
72 time4_8beamAutoEnd = #(begin (make-moment 1 4))
73 time4_8beamAutoEnd_16 = #(begin (make-moment 1 4))
74 time4_8beamAutoEnd_32 = #(begin (make-moment 1 8))
75
76 time4_16beamAutoEnd = #(begin (make-moment 1 8))
77
78 time6_8beamAutoEnd = #(begin (make-moment 3 8))
79 time6_8beamAutoEnd_16 = #(begin (make-moment 3 8))
80 time6_8beamAutoEnd_32 = #(begin (make-moment 1 8))
81
82 time9_8beamAutoEnd = #(begin (make-moment 3 8))
83 time9_8beamAutoEnd_16 = #(begin (make-moment 3 8))
84 time9_8beamAutoEnd_32 = #(begin (make-moment 1 8))
85
86 time12_8beamAutoEnd = #(begin (make-moment 3 8))
87 time12_8beamAutoEnd_16 = #(begin (make-moment 3 8))
88 time12_8beamAutoEnd_32 = #(begin (make-moment 1 8))
89
90
91
92 %{
93
94 Users may override in most cases, simply by issuing
95
96     % from here on consider ending beam every 1/4 note
97     \property Voice.beamAutoEnd = #(make-moment 1 4)
98
99     % no autobeaming
100     \property Voice.beamAuto = ##f  
101
102 or, more globally, by doing:
103
104  \paper{
105         \translator{
106             \VoiceContext
107             % consider ending beam at every 1/2 note
108             beamAutoEnd = #(make-moment 1 2)
109         }
110     }
111
112 see also input/test/auto-beam-override.ly
113
114 %}
115