lilypond-user
[Top][All Lists]

## Re: matching unequal bars in separate staves

 From: Ralph Palmer Subject: Re: matching unequal bars in separate staves Date: Tue, 8 Feb 2011 14:56:41 -0500

On Mon, Feb 7, 2011 at 6:04 PM, Neil Puttock wrote:
On 7 February 2011 20:27, Shane Brandes <address@hidden> wrote:
> That works. Sort of ugly but it works.

This snippet shows the correct approach:

http://lilypond.org/doc/v2.12/input/lsr/lilypond-snippets/Rhythms#Changing-time-signatures-inside-a-polymetric-section-using-_005cscaleDurations

% Remove default LilyPond tagline
tagline = ##f
}

\paper {
#(set-paper-size "letter" 'landscape)
}

global = { }

rightPianoI = \relative c'' {
\global \time 2/4
% Music follows here.
a8] r d a r d[ a] r d, a' r d[ a] r r4
}

leftPianoI = \relative c'' {
\global \clef "treble"
% Music follows here.
\time 2/4  r8 g[ d]  r g[ d] r g[ d] r g[ d] r g[ d] r
}

rightPianoII = \relative c'' {
\global
% Music follows here.
\scaleDurations #'(4 . 3) {
\time 2/4
\set Timing.measureLength = #(ly:make-moment 2 3)
a8 r8 r8 d8 a2
d8 r8 r4
}
}

leftPianoII = \relative c'' {
\global \clef "treble"
% Music follows here.
\scaleDurations #'(4 . 3) {
\time 2/4
\set Timing.measureLength = #(ly:make-moment 2 3)
r8 g8 [  d8] r8 r4 g4( d8) r8 r4
}
}

pianoIPart = \new PianoStaff \with {
instrumentName = ""
} <<
\new Staff = "right" \with {
midiInstrument = "acoustic grand"
} \rightPianoI
\new Staff = "left" \with {
midiInstrument = "acoustic grand"
} { \clef bass \leftPianoI }
>>

pianoIIPart = \new PianoStaff \with {
instrumentName = ""
} <<
\new Staff = "right" \with {
midiInstrument = "acoustic grand"
} \rightPianoII
\new Staff = "left" \with {
midiInstrument = "acoustic grand"
} { \clef bass \leftPianoII }
>>

\score {
<<
\pianoIPart
\pianoIIPart
>>
\layout {
\context {
\Score
\remove "Timing_translator"
\remove "Default_bar_line_engraver"
\remove "Bar_number_engraver"
}
\context {
\Staff
\consists "Timing_translator"
\consists "Default_bar_line_engraver"
}

\context {
\Voice
\remove "Forbid_line_break_engraver"
tupletFullLength = ##t
}
}
\midi { }
}

Cheers,
Neil

Beautiful! Thanks, Neil. I had pretty much given up.

Ralph

--
Ralph Palmer
Montague City, MA
USA