[Top][All Lists]

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

Re: Metronome mark not aligning correctly

From: Jean Abou Samra
Subject: Re: Metronome mark not aligning correctly
Date: Sat, 6 Nov 2021 09:10:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1

Le 05/11/2021 à 23:09, David Kastrup a écrit :
I think one change should be that cross-staff needs to be more than a
flag.  It rather needs to be a pair of staves identified in some manner
where distancing of any staff pairs in that interval will not involve
the cross-staff material, but it otherwise will contribute to the
outlines and dimensions, and particularly to the distancing from staves
outside of the cross-staffed interval.

I know you've been desiring that one for long.
Now that I see a bit better how the backend works,
I no longer think it is feasible. At the very
least, it requires far more extensive changes than
the ones I was thinking about. Because page spacing
is determined by _global_ optimization on a problem
of springs and rods. The problem spans the whole
page. For distancing staves outside of the cross-staff
interval, you need to compute rods, which require
skylines or at least extents, which lead to
wondering what the grob looks like, which in
turns requires knowledge of page spacing that
couldn't happen yet.

What I believe would be feasible is reusing
the pure estimates in that story. They are
already independent of page spacing by definition.
Since the line breaking information is available
by the time we are talking about, the estimates
for the chosen [start, end] range should not
be off by too much.

Cross-staff notes is one of my primary use cases for the whole “pushing grobs 
between contexts”: cross-staff notes should ultimately just be grobs pushed 
from one staff context to another, with the requirement [which not*all*  
“pushed” grobs would share] that they might be connected to the original 
context by stems, beams, etc.

In that case, consider rethinking the approach
in the other thread with broadcasting events on
the listeners of a different context. I may be
wrong, but I don't see that this can easily be
made to typeset cross-staff, particularly when
considering other grobs that should move along.
Take what we currently write as

\version "2.22.1"

\new PianoStaff \with {
  \consists Span_stem_engraver
  \new Staff { c'^\p }
  \new Staff \crossStaff { \clef bass c }

In an ideal world of 'pushing' grobs, that would
be written as something like

<c \pushTo "up" c'>^\p

but the \p should also be pushed or something
should be done about it because of its direction.
In more complex cases, I have trouble seeing
how you could determine where to send the grob
based on the sole event before it has been
broadcast anywhere -- which is early in a

Anyway, it's all gut feelings and I don't claim
to hold a truth here. But it's worth noting that
the part combiner, which is implemented through
dispatching between contexts, is in a pitifully
buggy state. Intuitively, I tend to believe that
an approach based on actually pushing grobs rather
than events would be more effective. That would
also have the direct advantage of allowing to
push the likes of bar numbers that don't have
a cause in events.


reply via email to

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