Hi Jean,
thanks for all your work and explanations.
I'll split my answer into different mails.
This one is about the design
Am Mo., 11. Apr. 2022 um 18:04 Uhr schrieb Jean Abou Samra <jean@abou-samra.fr>:
Le 11/04/2022 à 17:20, Thomas Morley a écrit :
Well, your example prints as I would wish it should.
Alas, there are obviously different opinions. Look at:
\layout {
\context {
\Voice
\consists Duration_line_engraver
}
}
<<
\new Staff {
\override Glissando.breakable = ##t
c'1(\-\startTextSpan\glissando \break s1 c''1)\stopTextSpan
}
\new Staff { s1 \key cis \major s1 s1 }
Not all spanners start/end equal.
Imho, it's a mess which needs design decisions.
Hm. That's right. Let's consider another example:
\version "2.23.8"
\layout {
\context {
\Voice
\consists Duration_line_engraver
}
}
\paper {
ragged-right = ##t
}
<<
\new Staff { c'1\- \break c'1 }
\new Staff { c'1 \breathe c'1 }
>>
Well, maybe it doesn't make sense anyway -- I don't think I've
ever seen a breathing sign in one staff and not another.
Though, if this is something we want to support, I think we'll
agree that the duration line in the upper staff should not be
affected by the breathing sign, as the breathing sign doesn't
apply to that staff.
I slightly disagree.
In many details DurationLine was tailored after Glissando and
Glissando _is_ effected by the breathing sign. See:
\layout {
\context {
\Voice
\consists Duration_line_engraver
}
}
\paper {
ragged-right = ##t
}
<<
\new Staff {
\override Glissando.breakable = ##t
\override Glissando.after-line-breaking = ##t
\override DurationLine.after-line-breaking = ##t
\override Score.RehearsalMark.break-visibility = ##(#t #t #t)
c'1\-\glissando
%\mark \default
\break c''1
}
\new Staff {
c'1
\breathe
c'1
}
>>
Thus any design decision should affect both, DurationLine and Glissando, imho.
Making the DurationLine affected only by breakable items in
its staff is easy to define (implementation: see below). If
we decide that we want different behaviors for different breakable
items, like KeySignature vs. BreathingSign, a definition is
going to be trickier ...
If you uncomment \mark above then DurationLine is affected and Glissando not.
That's the bug at hand, imho.
I have a fix for it in a local branch, explicitely removing
RehearsalMark from items to consider.
Isn't it sufficient here?
If you agree I'll do some polish and probably add a regtest and open a MR.