]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/subdividing-beams.ly
4704: Update doc-snippet through makelsr.py
[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.19.34
8 \version "2.19.34"
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 metric value of the subdivision.
21 If the group following the division is shorter than the current metric
22 value (usually because the beam is incomplete) the number of beams
23 reflects the longest possible subdivision group.  However, if there is
24 only one note left after the division this restriction isn't applied.
25 Note that @code{baseMoment} defaults to one over the denominator of the
26 current time signature if not set explicitly. It must be set to a
27 fraction giving the duration of the beam sub-group using the
28 @code{ly:make-moment} function, as shown in this snippet. Also, when
29 @code{baseMoment} is changed, @code{beatStructure} should also be
30 changed to match the new @code{baseMoment}:
31
32 "
33   doctitle = "Subdividing beams"
34 } % begin verbatim
35
36 \relative c'' {
37   c32[ c c c c c c c]
38   \set subdivideBeams = ##t
39   c32[ c c c c c c c]
40
41   % Set beam sub-group length to an eighth note
42   \set baseMoment = #(ly:make-moment 1/8)
43   \set beatStructure = #'(2 2 2 2)
44   c32[ c c c c c c c]
45
46   % Set beam sub-group length to a sixteenth note
47   \set baseMoment = #(ly:make-moment 1/16)
48   \set beatStructure = #'(4 4 4 4)
49   c32[ c c c c c c c]
50
51   % Shorten beam by 1/32
52   \set baseMoment = #(ly:make-moment 1/8)
53   \set beatStructure = #'(2 2 2 2)
54   c32[ c c c c c c] r32
55
56   % Shorten beam by 3/32
57   \set baseMoment = #(ly:make-moment 1/8)
58   \set beatStructure = #'(2 2 2 2)
59   c32[ c c c c] r16.
60
61 } % begin verbatim