[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RemoveEmptyStaffContext
From: |
Gilles Sadowski |
Subject: |
Re: RemoveEmptyStaffContext |
Date: |
Tue, 10 Feb 2009 13:39:58 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
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.
>
> What would be a good way to benefit from \RemoveEmptyStaffContext and
> still get a useful MIDI? I'm currently considering to write
> non-printing rests (S-rests) in voice B where it matches voice C and
> then develop a scheme function that copies the measures from C where B
> has S-rests. But I was wondering whether there are other means to deal
> with this situation.
You could use different "\tag"s (e.g. "midi" and "score"). Something like:
BC = \relative c' { a4 b a b }
B = \relative c' { c4 d e \tag #'midi { \BC } \tag #'score { s4*4 } d4 c }
C = \relative c' { a4 b a \BC g f }
Then in the "\midi" block you use
\keepWithTag #'midi { ... }
and, in the "\layout",
\keepWithTag #'score { ... }
[Not tested. It would have been easier if you provided a minimal working
example of your current code.]
Best,
Gilles