lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tweaking an ottava bracket after a break


From: Knute Snortum
Subject: Tweaking an ottava bracket after a break
Date: Sat, 6 Nov 2021 14:01:26 -0700

Hello again,

I have a situation where I need to adjust the padding of an ottava
bracket after a line break. That is, I want to affect the bracket on
the second line, but not the first.

I know you can do something like this with the \shape function, but
what about brackets?

I tried this solution -- blatantly stolen from the Difficult Tweaking
section in the manual -- but it doesn't work.

%%%
\version "2.22.1"

#(define (my-callback grob)
   (let* (
          ;; have we been split?
          (orig (ly:grob-original grob))

          ;; if yes, get the split pieces (our siblings)
          (siblings (if (ly:grob? orig)
                        (ly:spanner-broken-into orig)
                        '())))

     (if (and (>= (length siblings) 2)
              (eq? (car (last-pair siblings)) grob))
         (ly:grob-set-property! grob 'padding 4))))

\relative {
  \override OttavaBracket.after-line-breaking = #my-callback
  \ottava 1 c''''1 \break
  c2 2
}
%%%

Anything easier than this?  Some other solution?

--
Knute Snortum



reply via email to

[Prev in Thread] Current Thread [Next in Thread]