[Top][All Lists]

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

Re: cross-staff, broken Glissando

From: Jean Abou Samra
Subject: Re: cross-staff, broken Glissando
Date: Sun, 7 Nov 2021 14:00:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1

Le 07/11/2021 à 13:47, Thomas Morley a écrit :
Am So., 7. Nov. 2021 um 13:26 Uhr schrieb Jean Abou Samra <>:
(Adding Aaron in CC.)

Le 07/11/2021 à 12:39, Thomas Morley a écrit :

commit 94860164493ab3a209986b0e3662ff7bd8958cb5
Author: Mike Solomon <>
Date:   Mon Mar 28 10:58:29 2011 -0400

      Assures smooth transitions at glissando line breaks.

      When a glissando breaks over lines, the left point of the 
      glissando picks up on the y-axis where the right point of the end-of-line
      glissando ends.

is not true for cross-staff, broken Glissando.
For a down-pointing Glissando, ending in a lower Staff this "pick-up"
point is not matched.
For an up-pointing Glissando starting in a lower Staff the first part
is completely off. This is
See attachment.

I get seemingly correct output in the issue's
example when adding

    \override Glissando.simple-Y = ##f

So I'd start by investigating why simple-Y was
added in the first place.
Doing so fails for:
   \override Glissando.simple-Y = ##f
   e'''1.\glissando s2
   s2 \once \override NoteColumn.glissando-skip = ##t
   s2 bes
programming error: no note heads for the line spanner on neighbor
line? Confused.
continuing, cross fingers

Well yes, hence “investigate”.

While attempting to code stemmed Glissandi in scheme, there was a very
helpful discussion starting here:
lastly arriving at
Basically I try to get start- and end-points of all kinds of
Glissandi, printing crosses there.
Many thanks to Aaron!

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 {
  \new Staff {
    \override Glissando.stencil =
      #(lambda (grob)
         (ly:message "~s"
                       (ly:grob-system grob)
         (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.

As my work schedule allows, I would be willing to assist you both in breaking down C++ code into Scheme and providing some educational guidance to get you fishing on your own.

Thanks. I did learn some C++ (mostly by
try-and-fail while reading LilyPond source
code), but I will keep the proposal in


reply via email to

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