lilypond-user
[Top][All Lists]
Advanced

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

## Distance of a grob from its reference point

 From: Paolo Prete Subject: Distance of a grob from its reference point Date: Tue, 14 Jan 2020 04:05:09 +0100

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

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