[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue
From: |
k-ohara5a5a |
Subject: |
Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue 6948058) |
Date: |
Mon, 17 Dec 2012 06:13:23 +0000 |
On 2012/12/16 08:09:38, dak wrote:
Well, the idea was to use this in pairs of contexts with otherwise
identical harakiri conditions, and give only one of them the
dead-is-alive flag. So one context pops up only when the other
doesn't.
I had the idea of using this with the Keep_alive_together engraver >
in order to make the conditions identical by force (and that is
mentioned in the doc strings), but [...]
That works fine. The input below will show a single staff, except for
the one line containing the voice-crossing section, regardless of where
the line-breaks fall. (We can do this with current LilyPond using two
Staff contexts; the new feature enables the measure that could be
printed either as chords or divided staves, depending on linebreaks.)
The problems with 'dead-is-alive' are the difficulty of keeping track of
the reversed logic, and loss of the usual action of removeEmptyStaves
when all affected staves are truly empty.
\paper {
#(set-paper-size "a6")
indent = 1.0\cm
short-indent = 1.2\cm
}
violinII = \relative c' {
c4 d e f g f e d
<c e>-"divisi" <d f> <e g> <f a>
s1 % this measure is too complex to show on a single staff
c4-"unison" d e f g f e d
c d e f c1
\bar "|."}
letStaffVanish = \set Staff.keepAliveInterfaces = #'()
showStaff = \unset Staff.keepAliveInterfaces
violinIIa = \relative c' {
\letStaffVanish \quoteDuring "violinII" s1*2
e4 f g a
\showStaff b4 g d g
\letStaffVanish \quoteDuring "violinII" s1*4
}
violinIIb = \relative c' {
\letStaffVanish \quoteDuring #"violinII" s1*2
c4 d e f
\showStaff g4 b d b
\letStaffVanish \quoteDuring #"violinII" s1*4 }
\addQuote "violinII" \violinII
\new StaffGroup <<
\new Staff \with {
instrumentName = "Vn 1"
shortInstrumentName = "Vn1"
} \repeat unfold 8 c''1
\new GrandStaff \with {
\consists Keep_alive_together_engraver
instrumentName = "Vn 2"
shortInstrumentName = "Vn2"
} <<
\new Staff \with {
\override VerticalAxisGroup #'remove-first = ##t
shortInstrumentName="outer"
} \new Voice \violinIIa
\new Staff \with {
\override VerticalAxisGroup #'dead-is-alive = ##t
\override VerticalAxisGroup #'remove-first = ##t
keepAliveInterfaces = #'()
} \violinII
\new Staff \with {
\override VerticalAxisGroup #'remove-first = ##t
shortInstrumentName="inner"
} \new Voice \violinIIb >> >>
\layout { \context {
\Staff \RemoveEmptyStaves }}
https://codereview.appspot.com/6948058/
- Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue 6948058), dak, 2012/12/15
- Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue 6948058), k-ohara5a5a, 2012/12/15
- Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue 6948058), dak, 2012/12/15
- Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue 6948058), k-ohara5a5a, 2012/12/15
- Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue 6948058), dak, 2012/12/16
- Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue 6948058),
k-ohara5a5a <=
- Re: Add dead-is-alive boolean property to Hara_kiri_group_spanner (issue 6948058), dak, 2012/12/17