lilypond-user
[Top][All Lists]
Advanced

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

Re: \override VerticalAxisGroup #'remove-empty works only at the beginni


From: Nicolas Sceaux
Subject: Re: \override VerticalAxisGroup #'remove-empty works only at the beginning of a score
Date: Wed, 11 Nov 2009 16:51:41 +0100

Le 11 nov. 2009 à 16:07, Reinhold Kainhofer a écrit :

Now, this is a problem, if the whole score consists of several different parts.
For example, I have a choral score with fugues and a soprano solo.
during the fugues, none of the staves should be removed (if e.g. the Alto sets in 9 measures later, I still need the empty staff for them them), but during
the soprano solo, the alto, tenor and bass should be removed.

By adding the rest-interface to Score.keepAliveInterface, you prevent
a staff from being removed when there are rests.

startUnremovableSection = \set Staff.keepAliveInterfaces =
    #'(rhythmic-grob-interface
    rest-interface
    lyric-interface
    percent-repeat-item-interface
    percent-repeat-interface
    stanza-number-interface)

endUnremovableSection = \unset Staff.keepAliveInterfaces

\score {
  <<
    \new Staff {
      \startUnremovableSection
      c'1 R R c'
      \endUnremovableSection
      e'1 R R e'
    }
    \new Staff {
      \clef "bass" \repeat unfold 8 { c1 \break }
    }
  >>
  \layout {
    \context { \RemoveEmptyStaffContext }
  }
}





reply via email to

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