lilypond-user
[Top][All Lists]
Advanced

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

Removing empty systems/groups


From: Alex Voice
Subject: Removing empty systems/groups
Date: Tue, 09 Oct 2012 00:02:38 +0100
User-agent: Microsoft-MacOutlook/14.2.4.120824

Hi Lilypond Experts,

In a small orchestral score that incorporates an intermittent chorale-like string quartet, I'd like to have all staves showing at the start (I think I've worked that bit out), but thereafter remove the quartet StaffGroup from the score unless one or more of the parts of the quartet is playing, in which case I would like to see all four parts of the quartet (even if their staves are empty) – just for ease of following.

I've tried consulting the documentation, but none of the snippets or examples seemed to do quite what I need. Has it anything to do with you hara kiri option – it looked interesting, but again I wasn't quite sure how to implement it. 

This is the structure I have at present:


\version "2.16.0"

\score 
{ \relative c'
   <<
     \new StaffGroup = "StaffGroup_woodwinds" 
<<
       \new Staff = "Staff_flute" { c'4 d e d | e g f d }
       \new Staff = "Staff_oboe" { c4 d e d | e g f d }
     >>

     \new StaffGroup = "StaffGroup_Quartet" 
<<
       \new GrandStaff = "GrandStaff_violins_c" 
<<
         \new Staff = "Staff_c_violinI" { c4 b c d | e c d g }
         \new Staff = "Staff_c_violinII" { c,4 g' a b | c e, d b }
       >>
       \new Staff = "Staff_c_viola" { \clef alto c,4 b c d | e c d g }
       \new Staff = "Staff_c_cello" { \clef bass c,,4 b c d | e c d g }
     >>

     \new StaffGroup = "StaffGroup_Strings" 
<<
       \new GrandStaff = "GrandStaff_violins" 
<<
         \new Staff = "Staff_violinI" { c'1 | b }
         \new Staff = "Staff_violinII" { c1 | g }
       >>
       \new Staff = "Staff_viola" { \clef alto c,2 e | f d } 
       \new Staff = "Staff_cello" { \clef bass c,1 | g }
     >>
   >>
}

\layout 
{
   \context 
{ \RemoveEmptyStaffContext }
  }


Many thanks for any help or enlightenment you can offer.

Alex Voice, UK

PS: I discovered LilyPond only a few months ago; congratulations to all who have made it a truly wonderful program - the digest written by and for the (very diverse) community is quite amazing and inspiring – long may it continue.

reply via email to

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