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