2018-04-10 22:45 GMT+02:00 Simon Albrecht <simon.albre...@mail.de>: > Hello everybody, > > suppose I want to globally override the direction of slurs, as far as > neutral voices go. If I do this: > > %%%%%%%%%%%%%%% \version "2.19.80" \layout { \context { \Voice > \override Slur.direction = #UP } } music = { c'( d' e' f') } { \music > \voiceTwo \music \oneVoice \music } %%%%%%%%%%%%%%%% > > then in bar 3 the slur will go below the notes, i.e. \oneVoice reverted the > direction without knowing that an override was in effect. > > I’d love to be able to redefine \voiceTwo & Co. such as to imply \temporary, > but that’s not currently possible: > > warning: Cannot make PropertySet revertible. > > Does anybody have an idea for another solution? > > Best, Simon
\voiceXxx contain \set Voice.graceSettings = ... Setting a context-property revertible is not yet possible. All other settings are overrides, so probably below may work. Please be aware it's not tested beyond the given example! foo = #(define-music-function (mus)(ly:music?) (music-map (lambda (m) (if (music-is-of-type? m 'override-property-event) (begin (ly:music-set-property! m 'pop-first '()) m) m)) mus)) myVoiceOne = \foo \voiceOne myVoiceTwo = \foo \voiceTwo myVoiceThree = \foo \voiceThree myVoiceFour = \foo \voiceFour music = { c'4(-^ d'-1\startTrillSpan e' f'\stopTrillSpan) } \markup \box \fill-line { "DEFAULT \\voiceXxx" } { \music \voiceTwo \music \oneVoice \music } \markup \box \fill-line { "Custom \\voiceXxx" } { \music \myVoiceTwo \music \oneVoice \music } Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user