| [ << Contexts and engravers ] | [Top][Contents] | [ Education >> ] |
| [ < Changing MIDI output to one channel per voice ] | [ Up: Contexts and engravers ] | [ Creating arpeggios across notes in different voices > ] |
Changing time signatures inside a polymetric section using \scaleDurations
Flexible polymeter with unaligned measures
To support explicit creation of independently measured contexts, remove the
Timing_translator from Score context and define a
TimingStaffGroup context that has Timing_translator. This makes
Timing an alias for TimingStaffGroup, targeting \time
commands to the enclosing TimingStaffGroup.
Unlike LilyPond’s built-in \enablePerStaffTiming command, this approach
requires the explicit creation of TimingStaffGroup contexts; in exchange,
it allows creating multiple Staff contexts that jointly follow the
measure defined in their enclosing TimingStaffGroup.
Locally scaled time signatures
Use the unscalable \time command to establish a measure of the desired
length in Timing, a.k.a. TimingStaffGroup. In this snippet, all
staves below TimingStaffGroup use a scaled time signature, so any time
signature with the desired measure length is as good as any other. If there
were an enclosed context that did not use a scaled time signature, the choice of
time signature to set in Timing would matter in that context.
Use the \polymetric \time command to set scalable metric properties in
contexts below Timing, and use the \scaleDurations command to
scale both the local meter and the notes to fit the measure.
\layout { \context { \Score \remove "Timing_translator" \accepts TimingStaffGroup } \context { \StaffGroup \name TimingStaffGroup \alias StaffGroup \consists "Timing_translator" } } << \new TimingStaffGroup << \new Staff { \scaleDurations 8/5 { \time 6/5 % to set measure length in Timing \context Staff \polymetric \time 6/8 b8 b b b b b \time 4/5 % to set measure length in Timing \context Staff \polymetric \time 2/4 b4 b } } >> \new TimingStaffGroup << \new Staff { \clef bass \time 2/4 c2 d e f } >> >>
| [ << Contexts and engravers ] | [Top][Contents] | [ Education >> ] |
| [ < Changing MIDI output to one channel per voice ] | [ Up: Contexts and engravers ] | [ Creating arpeggios across notes in different voices > ] |