]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/subdividing-beams.ly
Merge branch 'master' into lilypond/translation
[lilypond.git] / Documentation / snippets / subdividing-beams.ly
1 % Do not edit this file; it is automatically
2 % generated from Documentation/snippets/new
3 % This file is in the public domain.
4 %% Note: this file works from version 2.13.29
5 \version "2.13.29"
6
7 \header {
8   lsrtags = "rhythms"
9
10   texidoc = "
11 The beams of consecutive 16th (or shorter) notes are, by default, not
12 subdivided.  That is, the three (or more) beams stretch unbroken over
13 entire groups of notes.  This behavior can be modified to subdivide
14 the beams into sub-groups by setting the property
15 @code{subdivideBeams}. When set, multiple beams will be subdivided at
16 intervals defined by the current value of @code{baseMoment} by reducing
17 the multiple beams to just one beam between the sub-groups. Note that
18 @code{baseMoment} defaults to one over the denominator of the current
19 time signature if not set explicitly. It must be set to a fraction
20 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 changed
23 to match the new @code{baseMoment}:
24
25 "
26   doctitle = "Subdividing beams"
27 } % begin verbatim
28
29
30 \relative c'' {
31   c32[ c c c c c c c]
32   \set subdivideBeams = ##t
33   c32[ c c c c c c c]
34
35   % Set beam sub-group length to an eighth note
36   \set baseMoment = #(ly:make-moment 1 8)
37   \set beatStructure = #'(2 2 2 2)
38   c32[ c c c c c c c]
39
40   % Set beam sub-group length to a sixteenth note
41   \set baseMoment = #(ly:make-moment 1 16)
42   \set beatStructure = #'(4 4 4 4)
43   c32[ c c c c c c c]
44 }
45