lilypond-user
[Top][All Lists]
Advanced

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

'divisi engraver' ignores \Remove(All)EmptyStaves


From: Rutger Hofman
Subject: 'divisi engraver' ignores \Remove(All)EmptyStaves
Date: Thu, 15 Feb 2018 09:39:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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


reply via email to

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