Indeed, or StaffGroup level if I'm following correctly. My issue is that I want to change the default keepAliveInterfaces for one staff within a StaffGroup. (Probably should have just posted this as my initial example, I suppose.)
targetstaff = #(define-scheme-function (ctx) (string?)
#{
\set Staff.keepAliveInterfaces = #'()
\context Staff = #ctx { \unset Staff.keepAliveInterfaces }
#})
music = {
\targetstaff "2"
c'1 d' e' d'
\break
\targetstaff "1"
R1*4
}
\new StaffGroup <<
\new Staff = "1" \with {
\override VerticalAxisGroup.remove-empty = ##t
\override VerticalAxisGroup.remove-first = ##t
instrumentName = "1"
shortInstrumentName = "1"
} \music
\new Staff = "2" \with {
\override VerticalAxisGroup.remove-empty = ##t
\override VerticalAxisGroup.remove-first = ##f
instrumentName = "2"
shortInstrumentName = "2"
keepAliveInterfaces = #'(
bass-figure-interface
chord-name-interface
cluster-beacon-interface
fret-diagram-interface
lyric-syllable-interface
note-head-interface
tab-note-head-interface
lyric-interface
percent-repeat-item-interface
percent-repeat-interface
;; need this, as stanza numbers are items, and appear only once.
stanza-number-interface
;; all the normal stuff ^
;; new stuff v
multi-measure-rest-interface
)
} \music
>>
Does this clarify what I'm trying to do with \unset?
Thanks!
Saul
Saul Tobin <address@hidden> writes:
> Interesting. So if the default property is set at the Staff level, for
> instance, then changed and \unset at the Voice level, it goes back to the
> default for the higher-level context. But if in the example \new Staff
> \with... is changed to \new Voice \with... the original problem arises
> where \unset reverts to the built-in default.
>
> Didn't realize about the \tuplet syntax. That's quite useful. Thanks for
> the tip!
>
> Actually, I just used tupletSpannerDuration because it was convenient to
> write a tiny example. My practical use case is changing the default
> keepAliveInterfaces for certain staves.
Ah, that is read at Staff level. You could set your score-wide default
at, well, Score level then.
--
David Kastrup