]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/subdividing-beams.ly
Doc-es: version marker for Usage/UPdating.
[lilypond.git] / Documentation / snippets / new / subdividing-beams.ly
1 \version "2.19.34"
2
3 \header {
4   lsrtags = "rhythms"
5
6   texidoc = "
7 The beams of consecutive 16th (or shorter) notes are, by default, not
8 subdivided.  That is, the three (or more) beams stretch unbroken over
9 entire groups of notes.  This behavior can be modified to subdivide the
10 beams into sub-groups by setting the property @code{subdivideBeams}.
11 When set, multiple beams will be subdivided at intervals defined by the
12 current value of @code{baseMoment} by reducing the multiple beams to
13 the number of beams that indicates the metric value of the subdivision. 
14 If the group following the division is shorter than the current metric
15 value (usually because the beam is incomplete) the number of beams
16 reflects the longest possible subdivision group.  However, if there is
17 only one note left after the division this restriction isn't applied.
18 Note that @code{baseMoment} defaults to one over the denominator of the
19 current time signature if not set explicitly. It must be set to a
20 fraction giving the duration of the beam sub-group using the
21 @code{ly:make-moment} function, as shown in this snippet. Also, when
22 @code{baseMoment} is changed, @code{beatStructure} should also be
23 changed to match the new @code{baseMoment}:
24
25 "
26   doctitle = "Subdividing beams"
27 }
28
29 \relative c'' {
30   c32[ c c c c c c c]
31   \set subdivideBeams = ##t
32   c32[ c c c c c c c]
33
34   % Set beam sub-group length to an eighth note
35   \set baseMoment = #(ly:make-moment 1/8)
36   \set beatStructure = #'(2 2 2 2)
37   c32[ c c c c c c c]
38
39   % Set beam sub-group length to a sixteenth note
40   \set baseMoment = #(ly:make-moment 1/16)
41   \set beatStructure = #'(4 4 4 4)
42   c32[ c c c c c c c]
43   
44   % Shorten beam by 1/32
45   \set baseMoment = #(ly:make-moment 1/8)
46   \set beatStructure = #'(2 2 2 2)
47   c32[ c c c c c c] r32
48   
49   % Shorten beam by 3/32
50   \set baseMoment = #(ly:make-moment 1/8)
51   \set beatStructure = #'(2 2 2 2)
52   c32[ c c c c] r16.
53   r2
54 }