]> git.donarmstrong.com Git - lilypond.git/blob - input/new/using-beatlength-and-beatgrouping.ly
Merge branch 'master' into nested-bookparts
[lilypond.git] / input / new / using-beatlength-and-beatgrouping.ly
1 \version "2.11.61"
2
3 \header {
4   lsrtags = "rhythms"
5   texidoc = "
6 The property @code{measureLength} determines where bar lines
7 should be inserted and, with @code{beatLength} and
8 @code{beatGrouping}, how automatic beams should be generated
9 for beam durations and time signatures for which no beam-ending
10 rules are defined.  This example shows several ways of controlling
11 beaming by setting these properties.  The explanations are shown
12 as comments in the code.
13 "
14   doctitle = "Using beatLength and beatGrouping"
15 }
16
17 \relative c'' {
18   \time 3/4
19   % The default in 3/4 time is to beam in three groups
20   % each of a quarter note length
21   a16 a a a a a a a a a a a
22
23   \time 12/16
24   % No auto-beaming is defined for 12/16
25   a16 a a a a a a a a a a a
26
27   \time 3/4
28   % Change time signature symbol, but retain underlying 3/4 beaming
29   \set Score.timeSignatureFraction = #'(12 . 16)
30   a16 a a a a a a a a a a a
31
32   % The 3/4 time default grouping of (1 1 1) and beatLength of 1/8
33   % are not consistent with a measureLength of 3/4, so the beams
34   % are grouped at beatLength intervals
35   \set Score.beatLength = #(ly:make-moment 1 8)
36   a16 a a a a a a a a a a a
37
38   % Specify beams in groups of (3 3 2 3) 1/16th notes
39   % 3+3+2+3=11, and 11*1/16<>3/4, so beatGrouping does not apply,
40   % and beams are grouped at beatLength (1/16) intervals
41   \set Score.beatLength = #(ly:make-moment 1 16)
42   \set Score.beatGrouping = #'(3 3 2 3)
43   a16 a a a a a a a a a a a
44
45   % Specify beams in groups of (3 4 2 3) 1/16th notes
46   % 3+4+2+3=12, and 12*1/16=3/4, so beatGrouping applies
47   \set Score.beatLength = #(ly:make-moment 1 16)
48   \set Score.beatGrouping = #'(3 4 2 3)
49   a16 a a a a a a a a a a a
50 }
51