]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/conducting-signs,-measure-grouping-signs.ly
Docs: run convert-ly for 2.14.0.
[lilypond.git] / Documentation / snippets / new / conducting-signs,-measure-grouping-signs.ly
1 \version "2.14.0"
2
3 \header {
4   lsrtags = "rhythms"
5   texidoc = "
6 Beat grouping within a measure is controlled by the context property
7 @code{beatStructure}.  Values of @code{beatStructure} are
8 established for many time signatures in
9 @file{scm/time-signature-settings.scm}.  Values of @code{beatStructure}
10 can be changed or set with @code{\set}.
11 Alternatively, the
12 Scheme function @code{set-time-signature} can be used to both
13 set the time signature and establish the beat structure.
14 @code{set-time-signature}, takes three arguments: the
15 number of beats, the beat length, and the internal grouping of beats in
16 the measure.  @code{\time} and @code{set-time-signature} both apply
17 to the @code{Timing} context, so they will not reset values of
18 @code{beatStructure} or @code{baseMoment} that are set in
19 other lower-level contexts, such as @code{Voice}.
20
21 If the @code{Measure_grouping_engraver} is included
22 in one of the display contexts, measure grouping signs will be
23 created.  Such signs ease reading rhythmically complex modern music.
24 In the example, the 9/8 measure is grouped in two different
25 patterns using the two different methods, while the 5/8 measure
26 is grouped according to the default setting in
27 @file{scm/time-signature-settings.scm}:
28 "
29   doctitle = "Conducting signs, measure grouping signs"
30 }
31
32
33 \score {
34   \new Voice \relative c'' {
35     \time 9/8
36     g8 g d d g g a( bes g) |
37     \set Timing.beatStructure = #'(2 2 2 3)
38     g8 g d d g g a( bes g) |
39     #(set-time-signature 9 8 '(4 5))
40     g8 g d d g g a( bes g) |
41     \time 5/8
42     a4. g4 |
43   }
44   \layout {
45     \context {
46       \Staff
47       \consists "Measure_grouping_engraver"
48     }
49   }
50 }