lilypond-user
[Top][All Lists]
Advanced

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

Re: \RemoveEmptyStaffContext (?)


From: Xavier Scheuer
Subject: Re: \RemoveEmptyStaffContext (?)
Date: Mon, 15 Aug 2011 22:59:58 +0200

On 15 August 2011 21:10, PMA <address@hidden> wrote:
>
> Hi List.
>
> I have a 40-bar LilyPond piano score notated in
> 3-staff systems (to accomodate a leaping-over
> left hand).  Occasionally one staff in a system,
> either the middle or upper, contains rests only.
>
> I want to exclude such staves from the output,
> and so have defined my \score block as follows,
> following Notation & Snippets Ref. suggestions.
>
> \score {
>  \new PianoStaff <<
>    \set PianoStaff.instrumentName = #""
>    \new Staff = "upper" \upper
>    \new Staff = "theme" \theme
>    \new Staff = "lower" \lower
>  >>
>  \layout {
>    \context { \RemoveEmptyStaffContext }
>  }
> }
>
> The output shows no errors, but also no effect:
> its rest-only staves are still there.  Could some-
> one possibly point up what I've overlooked?
>
> Thanks,
> Pete
>
> P.S.  My LilyPond version is 2.13.32.  Also,
>        "GrandStaff" yields the same result.
>

\RemoveEmptyStaffContext has been replaced by \Staff \RemoveEmptyStave
in version 2.13.something.

And IIRC default settings for  PianoStaff  is to remove either both
staves if both are "empty", either none if only one is empty (and the
other one contains notes).

If you want to remove the staves independently (if empty), try

\layout {
 \context {
   \Staff
   \RemoveEmptyStaves
 }
 \context {
   \PianoStaff
   \remove "Keep_alive_together_engraver"
 }
}


Cheers,
Xavier

PS : Current stable version is 2.14.2, please consider updating
(instead of using an old development version).

-- 
Xavier Scheuer <address@hidden>



reply via email to

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