Hello.
Is there a way to obtain, for a given grob

1) its *calculated* distance from its reference point? (from what I see,
the reference Y of an OttavaBracket is the middle line of the associated
staff...)
I tried ly:grob-staff-position (see the snippet below), but it doesn't seem
to give this info (and it's not documented)

2) the absolute Y coordinate of the grob's associated staff?

Thanks for you help

P

%%%%%%%%%%%%%%%%%%%%%%
{

\override Staff.OttavaBracket.after-line-breaking =
  #(lambda (grob)
    (let* ()
      (display (format #f "\n****\n~a\n****\n" (ly:grob-staff-position
grob)))))

\override Staff.OttavaBracket.Y-offset = 0
\ottava #1  c'' c'' c''\ottava #0  c''

\override Staff.OttavaBracket.Y-offset = 2
\ottava #1  c'' c'' c''\ottava #0  c''

\override Staff.OttavaBracket.Y-offset = 5
\ottava #1  c'' c'' c''\ottava #0  c''

\override Staff.OttavaBracket.Y-offset = 10
\ottava #1  c'' c'' c''\ottava #0  c''


\override Staff.OttavaBracket.Y-offset = 7
\ottava #1  c'' c'' c''\ottava #0  c''

}

Reply via email to