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, reinh...@kainhofer.com, 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
\version "2.13.7"
% This sample score has the following structure:
% Measures 1-3: tutti, empty staves should be kept
% measures 4-6: solo, empty staves of the 2. & 3. voice should be removed
% measures 7-end: tutti, empty staves should be kept again
\layout {
\context { \RemoveEmptyStaffContext }
\context { \Staff
\override VerticalAxisGroup #'remove-empty = ##f
}
}
m = \relative c'' { c1^"Tutti" c c c^"Solo" c c c^"Tutti" c }
musicA = \relative c' { d1 d R1 |
% We want to remove empty staves only during the Solo!
% this does not have any effect!
\override Staff.VerticalAxisGroup #'remove-empty = ##t
R1*3 |
\override Staff.VerticalAxisGroup #'remove-empty = ##f
R1 e1 \bar"|."
}
musicB = \relative c' { d1 R1 b1 |
% We want to remove empty staves only during the Solo!
\override VerticalAxisGroup #'remove-empty = ##t
R1*3 |
\override VerticalAxisGroup #'remove-empty = ##f
c1 c1 \bar"|."
}
\score {
<<
\new Staff \with { shortInstrumentName = "V1" } { << \m \repeat unfold 8 {s1\break} >> }
\new Staff \with { shortInstrumentName = "V2" } { \musicA }
\new Staff \with { shortInstrumentName = "V3" } { \musicB }
>>
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user