lilypond-user
[Top][All Lists]
Advanced

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

\override VerticalAxisGroup #'remove-empty works only at the beginning o


From: Reinhold Kainhofer
Subject: \override VerticalAxisGroup #'remove-empty works only at the beginning of a score
Date: Wed, 11 Nov 2009 16:07:36 +0100
User-agent: KMail/1.12.2 (Linux/2.6.31-14-generic; KDE/4.3.2; i686; ; )

It seems that overriding #'remove-empty for Staff.VerticalAxisGroup has only an 
effect if it is called prior to the first note of the staff. Any 
   \override VerticalAxisGroup #'remove-empty = ##t (or ##f)
after the first note does not have any effect. 

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.

I tried using 

\layout {
  \context { \RemoveEmptyStaffEngraver }
  \context { \Staff
    \override VerticalAxisGroup #'remove-empty = ##f
  }
}

and then in the music:
  b1 |
  % We want to remove empty staves only during the Solo!
  \override VerticalAxisGroup #'remove-empty = ##t
  R1*3 | 
  \override VerticalAxisGroup #'remove-empty = ##f
  c1 

Attached is a full sample file. I don't want the empty staves in measures 2 and 
3 removed, but during the solo (measures 4-6) all empty staves should be 
removed. Then, in measure 7, empty staves should no longer be removed...

Any idea how to implement this? Or how can I make #'remove-empty also work 
after a staff has started?

Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

Attachment: remove-empty.ly
Description: Text Data


reply via email to

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