|
| From: | Nicolas Sceaux |
| Subject: | Re: RemoveEmptyStaffContext |
| Date: | Fri, 13 Feb 2009 20:08:54 +0100 |
Le 10 févr. 09 à 10:40, Johan Vromans a écrit :
Hi, I have a score with 3 voices, A, B, and C. Voices B and C have a lot in common. For about half of the score the B parts is identical to the C part. By specifying rests in voice B where it is identical to voice C, and using \RemoveEmptyStaffContext, LilyPond can eliminate printing of voice B. That's good. And a space saver. But, not surprisingly, this makes the generated MIDI less useful. I split the MIDI into separate parts for the individual voices, and now voice B will have large gaps where it should sound the same as voice C. I hope it is clear what I mean.
You can make the second staff removable where the two voices are the same.
For instance:
\version "2.12.2"
startHaraKiri = \set Staff.keepAliveInterfaces = #'()
stopHaraKiri = \unset Staff.keepAliveInterfaces
voiceA = { c'1 d' e' f' g' }
voiceB = { e'1 d' e' f' e' }
%% voice A and voiceB are the same on bar 2, 3 and 4:
haraKiriVoiceB = { s1 \startHaraKiri s1*3 \stopHaraKiri s1 }
\score {
<<
\new Staff << \voiceA \repeat unfold 4 { s1 \break } >>
%% make the second staff removable:
\new Staff \with { \override VerticalAxisGroup #'remove-empty = ##t
\override Beam #'auto-knee-gap = #'()
\consists "Hara_kiri_engraver"
\remove "Axis_group_engraver" }
<< \voiceB \haraKiriVoiceB >>
>>
}
nicolas
| [Prev in Thread] | Current Thread | [Next in Thread] |