[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How To Selectively Show a Staff
From: |
David Wright |
Subject: |
Re: How To Selectively Show a Staff |
Date: |
Sun, 18 Oct 2020 17:45:21 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Sun 18 Oct 2020 at 23:43:18 (+0200), Jean Abou Samra wrote:
>
> Le 18/10/2020 à 17:40, Marc Shepherd a écrit :
> > In a score where "RemoveAllEmptyStaves" is set, a staff will
> > normally not show in a system where it has all rests.
> >
> > Sometimes, you may /want/a staff (temporarily) to appear on a
> > specific system, even though it contains all rests. What’s the
> > command or setting to do this?
> >
> Well, I can't explain the output of:
>
> \version "2.23.0"
>
> showIt = \set Staff.keepAliveInterfaces = #'(rest-interface)
> hideIt = \unset Staff.keepAliveInterfaces
>
> \new Score \with \RemoveAllEmptyStaves
> <<
> {
> R1 R1 R1 \break
> R1 R1 R1 \break
> \showIt
> R1 R1 R1 \break
> \hideIt
> R1 R1 R1 \break
> R1 R1 R1 \break
> }
> {
> \repeat unfold 15 { c'1 }
> }
> >>
>
> I would expect just the third staff to be shown, but in fact the
> second and the fourth are also printed.
>
> Do folks here think this is a bug? Am I missing something?
>
> Anyway, there is this workaround:
>
> \version "2.23.0"
>
> \new Score \with \RemoveAllEmptyStaves
> <<
> {
> R1\break
> << { \oneVoice R1 } \\ { \once \hideNotes c'1 } >> \break
> R1\break
> }
> {
> \repeat unfold 3 { c'1 }
> }
I just moved the show/hide away from the line ends, because I don't
know precisely when each component of the source is seen/enacted.
There may be some look behind/ahead.
Cheers,
David.
hide.ly
Description: Text document
hide.pdf
Description: Adobe PDF document