Good morning list,

I would like the 'divisi engraver' (Keep_alive_together_engraver with remove-layer and \targetstaff) to discard empty staves even if they are at an active VerticalAxisGroup.remove-layer, if \RemoveEmptyStaves or \RemoveAllEmptyStaves is set. Currently, such empty staves are displayed. What can I do to achieve what I want?

Rutger Hofman
Amsterdam

Minimal example (sorry, involves multiple staves/voices so not really small):

\version "2.19.80"

targetstaff = #(define-scheme-function (ctx) (string?)
    #{
        \set Staff.keepAliveInterfaces = #'()
        \context Staff = #ctx { \unset Staff.keepAliveInterfaces }
    #})

vI = \relative c'' {
    \targetstaff vIeII
    R1*8 |
    \break
    \repeat unfold 28 { c4 } |
}

vII = \relative c'' {
    \targetstaff vII
    \repeat unfold 12 { a4 } |
    \targetstaff vIeII
    R1*8 |
    \repeat unfold 16 { a4 } |
}

\score {
    <<
        \new StaffGroup \with {
            \consists Keep_alive_together_engraver
        } <<
            \new Staff = vI \with {
                \override VerticalAxisGroup.remove-layer = #10
                \RemoveAllEmptyStaves
            } {
                \vI
            }
            \new Staff = vII \with {
                \override VerticalAxisGroup.remove-layer = #10
                \RemoveAllEmptyStaves
            } {
                \vII
            }
            \new Staff = vIeII \with {
                \override VerticalAxisGroup.remove-layer = #20
            } <<
                \vI
                \\
                \vII
            >>
        >>
    >>
}

Attachment: hara-kiri-division.pdf
Description: Adobe PDF document

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to