Am So., 7. Nov. 2021 um 14:00 Uhr schrieb Jean Abou Samra <j...@abou-samra.fr>:
> >>> That said,... > >>> If I always compensate the right ending-point with (pseudo-code) > >>> (ly:grob-relative-coordinate <Glissando-grob> <System-grob> Y) > >>> Then the crosses are at those positions Mike's patch promises. > >> Really System? Isn't this going to create a > >> cyclic dependency between the stencil and > >> vertical alignment for non-cross-staff glissandi > >> via VerticalAxisGroup skylines? Off the top I would > >> think it should be a matter of correcting > >> reference points (see above). > > I compile with recent master, so your added warnings for cyclic > > dependencies may pop up. > > They don't. > > > Ah, because vertical alignment works via > ly:grob-translate-axis! and doesn't mark the > dependencies. Sigh. > > Look at: > > << > \new Staff { > c'1 > } > \new Staff { > \override Glissando.stencil = > #(lambda (grob) > (ly:message "~s" > (ly:grob-relative-coordinate > grob > (ly:grob-system grob) > Y)) > (ly:line-spanner::print grob)) > c'1\glissando c''1 > } > >> > > It prints "0.0". So there's no cyclic dependency > warned about, but it's not doing what you intend. > How could it? The glissando is part of the vertical > skylines of the VerticalAxisGroup. These are the > basis for vertical alignment. So you need the glissando's > stencil before you can take the Y coordinate of the > glissando relative to the system. Unless you have > a cross-staff glissando, because these aren't part > of the skylines -- but even then there is usually no > reason to take the root system and not just a refpoint > computed generically for both non-cross-staff > and cross-staff grobs. For non-cross-staff Glissando it returns always zero, yes, for cross-staff a certain value is found: << \new Staff = "top" { c'1 } \new Staff { \override Glissando.stencil = #(lambda (grob) (ly:message "~s" (ly:grob-relative-coordinate grob (ly:grob-system grob) Y)) (ly:line-spanner::print grob)) c'1\glissando \change Staff = "top" c''1 } >> -> -12.779 I tend to think: nice, let us always add this value, in any case it only matters for cross-staff at all. Why not? Cheers, Harm