lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding empty staves


From: Malte Meyn
Subject: Re: Hiding empty staves
Date: Fri, 3 Jun 2016 07:54:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0



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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]