]> git.donarmstrong.com Git - lilypond.git/blob - input/new/changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly
Merge master into nested-bookparts
[lilypond.git] / input / new / changing-time-signatures-inside-a-polymetric-section-using-scaledurations.ly
1 \version "2.11.61"
2 \header {
3   lsrtags = "rhythms,contexts-and-engravers"
4   texidoc = "The @code{measureLength} property, together with
5 @code{measurePosition}, determines when a bar line is needed.  However,
6 when using @code{\\scaleDurations}, the scaling of durations makes it
7 difficult to change time signatures.  In this case, @code{measureLength}
8 should be set manually, using the @code{ly:make-moment} callback.  The
9 second argument must be the same as the second argument of
10 @code{\\scaleDurations}."
11   doctitle = "Changing time signatures inside a polymetric section using @code{\\scaleDurations}"
12 }
13
14 \layout {
15   \context {
16     \Score
17     \remove "Timing_translator"
18     \remove "Default_bar_line_engraver"
19   }
20   \context {
21     \Staff
22     \consists "Timing_translator"
23     \consists "Default_bar_line_engraver"
24   }
25 }
26
27 <<
28   \new Staff {
29     \scaleDurations #'(8 . 5) {
30       \time 6/8
31       \set Timing.measureLength = #(ly:make-moment 6 5)
32       b8 b b b b b
33       \time 2/4
34       \set Timing.measureLength = #(ly:make-moment 4 5)
35       b4 b
36     }
37   }
38   \new Staff {
39     \clef bass
40     \time 2/4
41     c2 d e f
42   }
43 >>