On 18 August 2016 at 09:42, Evan O'Dorney <emo916m...@gmail.com> wrote: > Hi all, > > Is there a way to allow Lilypond to hide a staff on certain systems, similar > to \RemoveEmptyStaffContext, but applicable to certain non-empty staves? My > situation is that I have a choral piece where the 1st and 2nd sopranos > divide, and I would like to see two staves of identical material leading up > to the point on the system where the division happens. (The parts are > dissimilar enough to preclude notating the divisi on one staff.) For > example: > > << > \new Staff = "s1" { > \relative g' { > \repeat unfold 30 { g2 } a1 > } > } > \new Staff = "s2" { > \relative g' { > % The second staff may be hidden > \repeat unfold 30 { g2 } > % The second staff must be shown > f1 > } > } >>> > > Thanks, > Evan > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user >
This is what I use: \version "2.18.2" hideMusic = { \set Staff.keepAliveInterfaces = #'() } showMusic = \unset Staff.keepAliveInterfaces \score { << \new Staff = "s1" { \relative g' { \repeat unfold 30 { g2 } a1 } } \new Staff = "s2" { \relative g' { % The second staff may be hidden \hideMusic \repeat unfold 30 { g2 } % The second staff must be shown \showMusic f1 } } >> \layout { \context { \Staff \RemoveEmptyStaves % Remove the first staff \override VerticalAxisGroup.remove-first = ##t } } } Cheers, Vaughan _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user