p.s. To really see the effect, use

{ \octU c'''1 \break 1 1 \loco }

One of the main things I want control of is what the *broken* text is, and it 
still seems \alterBroken doesn’t work on OttavaBracket.

Cheers,
Kieren.

> On Feb 18, 2025, at 10:26 AM, Kieren MacMillan <kie...@kierenmacmillan.info> 
> wrote:
> 
> Hi all,
> 
> I’m still using this OttavaBracket “hack” from nearly a decade ago:
> [cf. https://lists.gnu.org/archive/html/lilypond-user/2015-12/msg00783.html]
> 
> %%%  SNIPPET ENDS
> \version "2.25.24"
> 
> #(define eightva
> #{
>   %% messing around with \with-dimensions,
>   %% because OttavaBracket has no details.stencil-align-dir-y
>   \markup
>       \with-dimensions #'(0 . 3.5) #'(-1 . 0.25)
>       \lower #1.625 \italic \concat { "8" \raise #0.45 { \hspace #0.05 
> \fontsize #-0.5 "va" } }
> #})
> #(define eightva-par
> #{
>   %% messing around with \with-dimensions,
>   %% because OttavaBracket has no details.stencil-align-dir-y
>   \markup
>       \translate #'(0.625 . 0) \with-dimensions #'(0 . 4.625) #'(0 . 2.625)
>       \lower #0.25 \concat { "(" \hspace #-0.125 \italic { "8" \raise #0.5 { 
> \hspace #0.125 "va" } } \hspace #0.1 ")" }
> #})
> octU = {
>  \once \override Staff.OttavaBracket.font-series = #'normal
>  \once \override Staff.OttavaBracket.before-line-breaking =
>      #(lambda (grob) (ly:grob-set-property! grob 'text eightva))
>  \override Staff.OttavaBracket.after-line-breaking =
>   #(lambda (grob)
>      (let* ((orig (ly:grob-original grob))
>             (siblings (if (ly:grob? orig)
>                           (ly:spanner-broken-into orig)
>                           '())))
>       (if (> (length siblings) 1)
>           (for-each
>             (lambda (sib) (ly:grob-set-property! sib 'text eightva-par))
>             (cdr siblings)))))
>  \ottava #1
> }
> 
> { \octU c'''1 1 \loco }
> %%%  SNIPPET ENDS
> 
> Is there a better way nowadays to get the kind of control I want over the 
> look/content of an OttavaBracket?
> 
> Thanks,
> Kieren.
__________________________________________________

My work day may look different than your work day. Please do not feel obligated 
to read or respond to this email outside of your normal working hours.


Reply via email to