lilypond-user
[Top][All Lists]
Advanced

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

Re: change Staff hara-kiri-ability on the fly? SPONSORSHIP?


From: Neil Puttock
Subject: Re: change Staff hara-kiri-ability on the fly? SPONSORSHIP?
Date: Sat, 25 Aug 2007 15:57:23 +0100

Hi Kieren,

On 8/25/07, Kieren MacMillan <address@hidden> wrote:

If you read the Hara_kiri_engraver docs, it says
______________________

Like Axis_group_engraver, but make a hara-kiri spanner, and add
interesting items (ie. note heads, lyric syllables and normal rests)

Properties (read)

     keepAliveInterfaces (list)
         A list of symbols, signifying grob interfaces that are worth
keeping a staff with remove-empty set around for.
______________________

If that property were settable (on the fly), we could add
MultiMeasureRest to (or remove it from) the keepAliveInterfaces as
desired -- that would solve the problem!

I've tried messing around with keepAliveInterfaces, and this is quite pleasing:

\version "2.11.30"
show = { \set Staff.keepAliveInterfaces = #'(
    rhythmic-grob-interface
    multi-measure-rest-interface
    lyric-interface
    stanza-number-interface
    percent-repeat-interface)
}
hide = \unset Staff.keepAliveInterfaces
\repeat unfold 4 { a1 b c' d' \break }
    R1 \show R1 R1 \hide R1 \break
    R1*4
}
two = { \override MultiMeasureRest #'color = #red
    R1*4
    R1 \show R1 R1 \hide R1
    R1*4
    R
    R1 \show R1 R1 R1
    R1*4
}
three = { \override MultiMeasureRest #'color = #blue
    R1*4
    R
    R1 \show R1 R1 \hide R1
    R1*4
    R1 \show R1 R1 \hide R1
    R1*4
}
\score {
    \new StaffGroup <<
    \context Staff = one \one
    \context Staff = two \two
    \context Staff = three \three
    >>
    \layout {
        \context { \RemoveEmptyStaffContext }
    }
}

The positioning of the overrides is critical (inside each system), otherwise they tend to interfere with the other staves.

Regards,
Neil

reply via email to

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