DynamicText artificially extends bar size when within a StaffGroup

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

DynamicText artificially extends bar size when within a StaffGroup

Jean-Baptiste Mazon-2
Hi,

I discovered this on my local 2.19.81, but it appears to be a regression
somewhere between 2.18.2 and 2.19.55 (compare http://lilybin.com/h2ixxn/1
and http://lilybin.com/h2ixxn/2)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.18.0"

% The \tweak isn't necessary per-se, it just makes it more visible
dyn = \tweak DynamicText.self-alignment-X #LEFT
  #(make-dynamic-script (markup #:normal-text
    "dynamic text shouldn't push next bar to the right"))

% Occurs within a StaffGroup:
\score { \new StaffGroup { r r r e''\dyn e'' e'' e'' e'' e'' } }

% But not out of it:
\score { \new Staff      { r r r e''\dyn e'' e'' e'' e'' e'' } }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Cheers,
JBM
_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: DynamicText artificially extends bar size when within a StaffGroup

Jean-Baptiste Mazon-2
I've narrowed the regression down to commit
9edf3715c2b2cca09785dcd015724ad3c29cba8a “Issue 621: Dynamics should avoid
cross-staff BarLines (e.g. GrandStaff, PianoStaff etc)”

>    Dynamics usually have extra-spacing-width set to an empty interval so
>    that their placement does not cause other elements to shift.
>
>    With span bars, however, the resulting overlap is a worse cure than
>    the problem.  So this switches off the width-hiding setting of
>    extra-spacing-width inside of staff groups using span bars by default.
>    No extra space is allocated, so dynamics will clear the span bars only
>    narrowly, a reasonable compromise.

Which makes a lot of sense when you read it. (and yay, reading the diff
provides me with a workaround)

So obviously, I'll stand in and say I disagree with the premise, given my
context, but now at least I see what the change's aim was.
Could we find some (more) compromise here?
It seems right now, the dynamic will refuse to cross a virtual bar line,
even if it causes a layout stretch, even if there's no barline to cross at
all (single staff within a group; last staff of the group; etc).

The UGLY situation does happen in the wild—that's how I discovered it.

Any opinion welcome.

Best,
JBM


%% original-report.ly
\version "2.18.0"
% The \tweak isn't necessary per-se, it just makes it more visible
dyn = \tweak DynamicText.self-alignment-X #LEFT
  #(make-dynamic-script (markup #:normal-text
    "dynamic text shouldn't push next bar to the right"))
% Occurs within a StaffGroup:
\score { \new StaffGroup { r r r e''\dyn e'' e'' e'' e'' e'' } }
% But not out of it:
\score { \new Staff      { r r r e''\dyn e'' e'' e'' e'' e'' } }

%% fuglyssimo.ly (less pathological, and with a staff below for context)
\version "2.19.0"
\new StaffGroup <<
  \new Staff <<
    { \repeat unfold 16 c''16 c''1 }
{ s2...\ff s16-#(make-dynamic-script (markup "pp" #:normal-text #:italic
"subitissimo")) }
  >>
  \new Staff R1*2
>>

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

original-report.png (17K) Download Attachment
fuglyssimo.png (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: DynamicText artificially extends bar size when within a StaffGroup

David Kastrup
Jean-Baptiste Mazon <[hidden email]> writes:

> I've narrowed the regression down to commit
> 9edf3715c2b2cca09785dcd015724ad3c29cba8a “Issue 621: Dynamics should avoid
> cross-staff BarLines (e.g. GrandStaff, PianoStaff etc)”
>
>>    Dynamics usually have extra-spacing-width set to an empty interval so
>>    that their placement does not cause other elements to shift.
>>
>>    With span bars, however, the resulting overlap is a worse cure than
>>    the problem.  So this switches off the width-hiding setting of
>>    extra-spacing-width inside of staff groups using span bars by default.
>>    No extra space is allocated, so dynamics will clear the span bars only
>>    narrowly, a reasonable compromise.
>
> Which makes a lot of sense when you read it. (and yay, reading the diff
> provides me with a workaround)
>
> So obviously, I'll stand in and say I disagree with the premise, given my
> context, but now at least I see what the change's aim was.
> Could we find some (more) compromise here?
> It seems right now, the dynamic will refuse to cross a virtual bar line,
> even if it causes a layout stretch, even if there's no barline to cross at
> all (single staff within a group; last staff of the group; etc).
>
> The UGLY situation does happen in the wild—that's how I discovered it.
>
> Any opinion welcome.

This wants improvement.  Basically we probably need a better way to
figure out whether we are in the middle of a StaffGroup with spanbars?

> %% original-report.ly
> \version "2.18.0"
> % The \tweak isn't necessary per-se, it just makes it more visible
> dyn = \tweak DynamicText.self-alignment-X #LEFT
>   #(make-dynamic-script (markup #:normal-text
>     "dynamic text shouldn't push next bar to the right"))
> % Occurs within a StaffGroup:
> \score { \new StaffGroup { r r r e''\dyn e'' e'' e'' e'' e'' } }
> % But not out of it:
> \score { \new Staff      { r r r e''\dyn e'' e'' e'' e'' e'' } }
>
> %% fuglyssimo.ly (less pathological, and with a staff below for context)
> \version "2.19.0"
> \new StaffGroup <<
>   \new Staff <<
>     { \repeat unfold 16 c''16 c''1 }
> { s2...\ff s16-#(make-dynamic-script (markup "pp" #:normal-text #:italic
> "subitissimo")) }
>   >>
>   \new Staff R1*2
>>>
>
>
>
> _______________________________________________
> bug-lilypond mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/bug-lilypond
>

--
David Kastrup

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: DynamicText artificially extends bar size when within a StaffGroup

Jean-Baptiste Mazon-2
Le dim. 19 janv. 2020 à 00:25, David Kastrup <[hidden email]> a écrit :

> This wants improvement.  Basically we probably need a better way to
> figure out whether we are in the middle of a StaffGroup with spanbars?
>

I assume that would clear the simple case of the dynamic that spans across
the line without crossing it (bottom staff in a group). There remains
(opinions mine):

* the pp subito case. In my dream world, the pp would strictly align on the
actual note; the subito would overflow right, with TeX-style overfull hbox
warning if it extends beyond the page margin. As long as it doesn't reach
the preceding note, I suppose it could tolerate being pushed left a bit to
avoid a barline, but not at the cost of increasing that note's width.

* the simultaneous dynamics case. I'd obviously want them all horizontally
aligned, even if the bottom one that has fewer restrictions.


On the converse side, I've found a similar case that could benefit from
avoiding barlines:

%% Example neither as minimal nor as telling as I'd like. Here it touches;
%% in my real-world case the second plus almost aligned on the barline.
\version "2.19.81"
\new StaffGroup <<
  \new Staff { \clef "soprano" c''2. b'4 b'2 c'' s1*20 }
  \figures { \bassFigureExtendersOn <7 4>2 q4 <7 _\+>4 <7\+>2 <5> }
  \new Staff { \clef "bass" g2 g,2 c1 s1*20 }
>>
%%%%%

A good thing Bass Figures are less likely than Dynamic Texts to expand
horizontally.


--
Jean-Baptiste Mazon

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

bass-figure-on-bar-line.png (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: DynamicText artificially extends bar size when within a StaffGroup

Jean-Baptiste Mazon-2
I'm going to go out on a limb and say I think the “fix“ was worse than the
problem.
I've got cases where it doesn't even need a barline to degenerate into
crazy spacing!

%% dynamic-span-exhibit-two.ly
\version "2.19.81"
\new StaffGroup  {
  a'16-\tweak DynamicText.X-offset #-1
      -#(make-dynamic-script (markup "mf" #:normal-text #:italic
"espressivo"))
    b'2...
}
%%%%%

Could we consider reverting this? I'm really not too fond of having to go
back and verify each and every one of my dynamic marks for *that*.

JBM


Le lun. 20 janv. 2020 à 12:08, Jean-Baptiste Mazon <[hidden email]> a
écrit :

> Le dim. 19 janv. 2020 à 00:25, David Kastrup <[hidden email]> a écrit :
>
>> This wants improvement.  Basically we probably need a better way to
>> figure out whether we are in the middle of a StaffGroup with spanbars?
>>
>
> I assume that would clear the simple case of the dynamic that spans across
> the line without crossing it (bottom staff in a group). There remains
> (opinions mine):
>
> * the pp subito case. In my dream world, the pp would strictly align on
> the actual note; the subito would overflow right, with TeX-style overfull
> hbox warning if it extends beyond the page margin. As long as it doesn't
> reach the preceding note, I suppose it could tolerate being pushed left a
> bit to avoid a barline, but not at the cost of increasing that note's width.
>
> * the simultaneous dynamics case. I'd obviously want them all horizontally
> aligned, even if the bottom one that has fewer restrictions.
>
>
> On the converse side, I've found a similar case that could benefit from
> avoiding barlines:
>
> %% Example neither as minimal nor as telling as I'd like. Here it touches;
> %% in my real-world case the second plus almost aligned on the barline.
> \version "2.19.81"
> \new StaffGroup <<
>   \new Staff { \clef "soprano" c''2. b'4 b'2 c'' s1*20 }
>   \figures { \bassFigureExtendersOn <7 4>2 q4 <7 _\+>4 <7\+>2 <5> }
>   \new Staff { \clef "bass" g2 g,2 c1 s1*20 }
> >>
> %%%%%
>
> A good thing Bass Figures are less likely than Dynamic Texts to expand
> horizontally.
>
>
> --
> Jean-Baptiste Mazon
>
>
>

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

dynamic-span-exhibit-two.png (10K) Download Attachment