[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Hiding empty staves
From: |
Jacques Menu Muzhic |
Subject: |
Re: Hiding empty staves |
Date: |
Fri, 3 Jun 2016 08:35:05 +0200 |
Hello Andrew,
From a previous thread:
%%%%%%%
\version "2.19.25"
%{
\RemoveEmptyStaves does not work primarily because \PianoStaff has the
Keep_alive_together_engraver. You should remove that one (or not use
\PianoStaff) and then invoke only the second Staff as
\new Staff \with { \RemoveEmptyStaves } { ... }
I have a harp score where there are a lot of lines that require only the upper
staff. How can I suppress the lower staff in lines where it is empty
If you don't want to retain the upper Staff with rests only when the
lower Staff has notes, things are a bit more tricky.
Basically, you'll
arrange to have your whole PianoStaff removed on demand, give it a
remove-layer of #0 but put _another_ copy of the first Staff (better
though a rest-only variant of it) in parallel with the PianoStaff,
giving it a remove-layer of #1. That way it will only survive into the
final score when both staves in the PianoStaff will die.
%}
%\new PianoStaff
<<
\new Staff \relative c' {
\repeat unfold 5 { c4 e g c }
\repeat unfold 12 { c2 a }
\repeat unfold 20 { R1 }
\repeat unfold 10 { c2 a }
\repeat unfold 8 { c,4 e g c }
}
\new Staff \with { \RemoveEmptyStaves }
\relative c {
\clef bass
\repeat unfold 5 { c4 e g c }
\repeat unfold 42 s1
\repeat unfold 8 { c,4 e g c }
}
>>
\layout {
\context {
% \Staff \RemoveEmptyStaves
}
}
%%%%%%%
> Le 3 juin 2016 à 07:54, Malte Meyn <address@hidden> a écrit :
>
>
>
> Am 03.06.2016 um 06:39 schrieb David Wright:
>> On Thu 02 Jun 2016 at 21:14:17 (-0400), Andrew Bernard wrote:
>>> I have a two stave piece using a PianoStaff. In some sections I need to
>>> hide the unused lower stave for a number of bars. Using \RemoveEmptyStaves
>>> or \RemoveAllmptyStaves does nothing. There are only spacer rests in the
>>> staff in question.
>>>
>>> The NR in Section A.20 says these functions 'Remove staves which are
>>> considered to be empty according to the list of interfaces set by
>>> keepAliveInterfaces, including those in the first system.’ But what does it
>>> mean for a staff to be considered empty?
>
> This is how keepAliveInterfaces is defined:
>
> keepAliveInterfaces = #'(
> bass-figure-interface
> chord-name-interface
> cluster-beacon-interface
> fret-diagram-interface
> lyric-syllable-interface
> note-head-interface
> tab-note-head-interface
> lyric-interface
> percent-repeat-item-interface
> percent-repeat-interface
> ;; need this, as stanza numbers are items, and appear only once.
> stanza-number-interface
> )
>
> A Staff which doesn’t contain items of these types is removed (f. e. a Staff
> only containig rests, spacer rests, but also key changes and some other
> things).
>
>> AFAICT just change PianoStaff to GrandStaff. I think I see the logic
>> in LP's behaviour.
>
> PianoStaff is an alias for GrandStaff except that it contains the
> Keep_alive_together_engraver. So using a GrandStaff should be the same as
> PianoStaff \with { \remove Keep_alive_together_engraver }
>
> This can be found in the Internals Reference and in the file engraver-init.ly.
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user