]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/subdividing-beams.ly
Imported Upstream version 2.14.2
[lilypond.git] / Documentation / snippets / new / subdividing-beams.ly
1 \version "2.14.0"
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
10 the beams into sub-groups by setting the property
11 @code{subdivideBeams}. When set, multiple beams will be subdivided at
12 intervals defined by the current value of @code{baseMoment} by reducing
13 the multiple beams to just one beam between the sub-groups. Note that
14 @code{baseMoment} defaults to one over the denominator of the current
15 time signature if not set explicitly. It must be set to a fraction
16 giving the duration of the beam sub-group using the
17 @code{ly:make-moment} function, as shown in this snippet. Also, when
18 @code{baseMoment} is changed, @code{beatStructure} should also be changed
19 to match the new @code{baseMoment}:
20
21 "
22   doctitle = "Subdividing beams"
23 }
24
25 \relative c'' {
26   c32[ c c c c c c c]
27   \set subdivideBeams = ##t
28   c32[ c c c c c c c]
29
30   % Set beam sub-group length to an eighth note
31   \set baseMoment = #(ly:make-moment 1 8)
32   \set beatStructure = #'(2 2 2 2)
33   c32[ c c c c c c c]
34
35   % Set beam sub-group length to a sixteenth note
36   \set baseMoment = #(ly:make-moment 1 16)
37   \set beatStructure = #'(4 4 4 4)
38   c32[ c c c c c c c]
39 }
40