Thanks Lukas-Fabian,

This is perfect and it will be very helpful in many situations. Regarding
your question: No, I was applying it to the 2nd system. If I put the
command \showMultiRests before the first bar of any system, it seems to
have no effect, but it works fine when I put it before any other bar on the
staff. As I rarely have just 1 bar on a staff this should not be a problem
in practice.

Thanks,
Aberforth D

On Mon, 29 Jun 2020 at 15:06, Lukas-Fabian Moser <l...@gmx.de> wrote:

> Hi,
>
> Am 29.06.20 um 14:41 schrieb Aberforth D - Instrumentals:
> > It works although it doesn't seem to work when applied to the first
> > bar on the staff, but I guess it's good enough.
>
> Do you mean that the staff is not removed in the first system? That's
> just the difference between \RemoveEmptyStaves und \RemoveAllEmptyStaves.
>
> > I would still be grateful if somebody could answer my second question
> > because it might be useful in specific circumstances. Namely, how to
> > hide a redundant staff when it doubles another staff without having to
> > replace the notes by rests, as described in my original message.
>
> The keepAliveInterfaces list defines which types of "event" prevent a
> staff from being removed. So:
>
> %%%%
> \version "2.20.0"
> \language "english"
>
> \layout {
>    \context {
>      \Staff
>      \RemoveAllEmptyStaves
>    }
> }
>
> killMeAtAllCosts = \set Staff.keepAliveInterfaces = #'()
> resurrectMe = \undo \killMeAtAllCosts
>
> fillBar = \relative c' { g'8[ g g g g g] | }
> fillLine = { \fillBar \fillBar \fillBar \fillBar }
>
> partA = {
>    \key d \major \time 6/8 \clef "G"
>    \fillLine \break
>    \killMeAtAllCosts \fillLine \break \resurrectMe
>    \fillLine
> }
>
> partB = {
>    \key d \major \time 6/8 \clef "G"
>    \fillLine
>    \fillLine
>    \fillLine
> }
>
> \score {
>    <<
>      \new Staff \with { shortInstrumentName = "Pt A" } \partA
>      \new Staff \with { shortInstrumentName = "Pt B" } \partB
>    >>
> }
>
> %%%%
>
> Lukas
>
>

Reply via email to