]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/subdividing-beams.ly
Adjust beam subdivision to only occur at baseMoment
[lilypond.git] / Documentation / snippets / subdividing-beams.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.18.0
8 \version "2.18.0"
9
10 \header {
11   lsrtags = "rhythms"
12
13   texidoc = "
14 The beams of consecutive 16th (or shorter) notes are, by default, not
15 subdivided.  That is, the three (or more) beams stretch unbroken over
16 entire groups of notes.  This behavior can be modified to subdivide the
17 beams into sub-groups by setting the property @code{subdivideBeams}.
18 When set, multiple beams will be subdivided at intervals defined by the
19 current value of @code{baseMoment} by reducing the multiple beams to
20 the number of beams that indicates the length of the sub-group.
21 Note that @code{baseMoment}
22 defaults to one over the denominator of the current time signature if
23 not set explicitly. It must be set to a fraction giving the duration of
24 the beam sub-group using the @code{ly:make-moment} function, as shown
25 in this snippet. Also, when @code{baseMoment} is changed,
26 @code{beatStructure} should also be changed to match the new
27 @code{baseMoment}:
28
29 "
30   doctitle = "Subdividing beams"
31 } % begin verbatim
32
33 \relative c'' {
34   c32[ c c c c c c c]
35   \set subdivideBeams = ##t
36   c32[ c c c c c c c]
37
38   % Set beam sub-group length to an eighth note
39   \set baseMoment = #(ly:make-moment 1/8)
40   \set beatStructure = #'(2 2 2 2)
41   c32[ c c c c c c c]
42
43   % Set beam sub-group length to a sixteenth note
44   \set baseMoment = #(ly:make-moment 1/16)
45   \set beatStructure = #'(4 4 4 4)
46   c32[ c c c c c c c]
47 } % begin verbatim