Le 01/02/2022 à 18:34, Valentin Petzel a écrit :
Thank you. As it seems prior to 2.23 the Volta Bracket engraver would override the text property even if you had manually specified this. So we can either directly modify this in the repeat command (which I consider a bit ugly), or try some workaround like this: (Basically this checks if details.text is set and sets text to details.text if so before calculating the stencil): \version "2.22" { \override Score.VoltaBracket.stencil = #(lambda (grob) (let* ((det (ly:grob-property grob 'details)) (det-text (assoc-get 'text det #f))) (if (markup? det-text) (ly:grob-set-property! grob 'text det-text)) (ly:volta-bracket-interface::print grob))) \repeat volta 2 { c' d' e' f' } \alternative { { \once\override Score.VoltaBracket.details.text = \markup\smaller"bla bla" \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1) g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno" } { \once\override Score.VoltaBracket.details.text = \markup\smaller"blu blu" \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1) c'1 } } }
Or use: \version "2.22" { \repeat volta 2 { c' d' e' f' } \alternative { { \overrideProperty Score.VoltaBracket.text \markup\smaller"bla bla" \once\override Score.VoltaBracket.shorten-pair = #'(0.1 . 1.1) g' a' b' c'' \mark\markup\smaller\smaller\musicglyph #"scripts.segno" } { \overrideProperty Score.VoltaBracket.text \markup\smaller"blu blu" \once\override Score.VoltaBracket.shorten-pair = #'(2.2 . -0.1) c'1 } } } \overrideProperty is the typical workaround for this kind of issue as it operates later than \override (at engraver acknowledge time) and thus can override decisions made in the meantime. Best, Jean