Printing music with different time signatures: Difference between revisions
Appearance
m New category Tags: Mobile edit Mobile web edit |
mNo edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 5: | Line 5: | ||
If bar numbers are required, the <code>Bar_number_engraver</code> should also be moved, since it relies on properties set by the <code>Timing_translator</code>; a <code>\with</code> block can be used to add bar numbers to the relevant staff. | If bar numbers are required, the <code>Bar_number_engraver</code> should also be moved, since it relies on properties set by the <code>Timing_translator</code>; a <code>\with</code> block can be used to add bar numbers to the relevant staff. | ||
<lilypond version="2.24" | <lilypond version="2.24"> | ||
global = { | |||
\time 3/4 s2.*3 \break | |||
s2.*3 | |||
} | } | ||
\layout { | \layout { | ||
| Line 39: | Line 36: | ||
\override BarNumber.break-visibility = #end-of-line-invisible | \override BarNumber.break-visibility = #end-of-line-invisible | ||
} << | } << | ||
\global { | \global | ||
{ | |||
\clef treble | \clef treble | ||
\time 3/8 | \time 3/8 d''4. | | ||
\time 3/4 r8 des''2( c''8) | | |||
\time 7/8 r4. ees''2 ~ | | |||
\time 2/4 \tupletUp \tuplet 3/2 { ees''4 r4 d''4 ~ } | | |||
\time 3/4 | \time 3/8 \tupletUp \tuplet 4/3 { d''4 r4 } | | ||
\time 2/4 e''2 | | |||
\time 3/8 es''4. | | |||
\time 3/4 r8 d''2 r8 | | |||
\time 7/8 | |||
\time 2/4 | |||
\time 3/8 | |||
\time 2/4 | |||
\time 3/8 | |||
\time 3/4 | |||
} | } | ||
>> | >> | ||
| Line 80: | Line 52: | ||
Perkussion = \new StaffGroup << | Perkussion = \new StaffGroup << | ||
\new Staff << | \new Staff << | ||
\global { | \global | ||
{ | |||
\clef percussion | \clef percussion | ||
\time 3/4 | \time 3/4 r4 c'2 ~ | | ||
c'2. | | |||
R2. | | |||
r2 g'4 ~ | | |||
c'2. | g'2. ~ | | ||
g'2. | | |||
R2. | |||
r2 g'4 ~ | |||
g'2. ~ | |||
g'2. | |||
} | } | ||
>> | >> | ||
\new Staff << | \new Staff << | ||
\global { | \global { | ||
\clef percussion | \clef percussion | ||
\time 3/4 | \time 3/4 R2. | | ||
g'2. ~ | | |||
g'2. | | |||
r4 g'2 ~ | | |||
g'2. ~ | g'2 r4 | | ||
g'2. | | |||
g'2. | |||
r4 g'2 ~ | |||
g'2 r4 | |||
g'2. | |||
} | } | ||
>> | >> | ||
| Line 135: | Line 84: | ||
</lilypond> | </lilypond> | ||
[[Category: | [[Category:Contexts and engravers]] | ||
[[Category:Contemporary notation]] | [[Category:Contemporary notation]] | ||
[[Category:Percussion]] | [[Category:Percussion]] | ||
[[Category:Really cool]] | [[Category:Really cool]] | ||
[[Category:Real music]] | [[Category:Real music]] | ||
[[Category:Rhythms]] | |||
[[Category:Included in the official documentation]] | |||
[[Category:Snippet]] | [[Category:Snippet]] | ||
Latest revision as of 10:55, 15 December 2025
In the following snippet, two parts have a completely different time signature, yet remain synchronized.
The bar lines can no longer be printed at the Score level; to allow independent bar lines in each part, the Default_barline_engraver and Timing_translator are moved from the Score context to the Staff context.
If bar numbers are required, the Bar_number_engraver should also be moved, since it relies on properties set by the Timing_translator; a \with block can be used to add bar numbers to the relevant staff.
\version "2.24"
global = {
\time 3/4 s2.*3 \break
s2.*3
}
\layout {
\context {
\Score
\remove "Timing_translator"
\remove "Bar_number_engraver"
\override SpacingSpanner.uniform-stretching = ##t
\override SpacingSpanner.strict-note-spacing = ##t
proportionalNotationDuration = #(ly:make-moment 1/64)
}
\context {
\Staff
\consists "Timing_translator"
}
\context {
\Voice
\remove "Forbid_line_break_engraver"
tupletFullLength = ##t
}
}
Bassklarinette = \new Staff \with {
\consists "Bar_number_engraver"
barNumberVisibility = #(every-nth-bar-number-visible 2)
\override BarNumber.break-visibility = #end-of-line-invisible
} <<
\global
{
\clef treble
\time 3/8 d''4. |
\time 3/4 r8 des''2( c''8) |
\time 7/8 r4. ees''2 ~ |
\time 2/4 \tupletUp \tuplet 3/2 { ees''4 r4 d''4 ~ } |
\time 3/8 \tupletUp \tuplet 4/3 { d''4 r4 } |
\time 2/4 e''2 |
\time 3/8 es''4. |
\time 3/4 r8 d''2 r8 |
}
>>
Perkussion = \new StaffGroup <<
\new Staff <<
\global
{
\clef percussion
\time 3/4 r4 c'2 ~ |
c'2. |
R2. |
r2 g'4 ~ |
g'2. ~ |
g'2. |
}
>>
\new Staff <<
\global {
\clef percussion
\time 3/4 R2. |
g'2. ~ |
g'2. |
r4 g'2 ~ |
g'2 r4 |
g'2. |
}
>>
>>
\score {
<<
\Bassklarinette
\Perkussion
>>
}