crescendo/diminuendo lines take vertical height from hairpin settings rather than dynamics text settings

• Jan 21, 2017 - 09:49
Reported version
3.0-dev
Priority
P0 - Critical
Type
Functional
Severity
S4 - Minor
Status
active
Regression
No
Workaround
No
Project
Priority (old)
normal
Status (old)
active
Component (old)
Code
Category (old)
bug report

Came up in https://musescore.org/en/node/88836

Via Style/General Style/Hairpins,Voltas,Ottavas it is possible to change the Default vertical position of hairpins, but these work for hairpins only, not for crescendo/diminuend lines.

Affects 2.0.3 and 2.1, but not master (which has a different problem here, see #164791: Style setting Above for Hairpins doesn't work)

As the positions do work in master, I think this is a bug and not by design, introduced when (de)crescendo lines got added in 2.0.3


Comments

Actually it *is* by design. Hairpin textlines were specifically designed to automatically line up as well as possible with dynamics. So they respond to the dynamics text style.

Title crescendo/diminuendo lines don't take the style settings for hairpins crescendo/diminuendo lines do take the style settings for hairpins instead that of dynamics
Title crescendo/diminuendo lines do take the style settings for hairpins instead that of dynamics crescendo/diminuendo lines not placed well if no dynamic marking present on start note

Well, I am not so sure - everything about this stuff has changed for master because of the new layout and auto-position of various elements. As far as I can tell, the crescendo lines are placed according the dynamic attached to the start note, if present and autoplaced. This is actually pretty reasonable behavior for that case. Less clear what the behavior should be if there is *not* dynamic on the start note though. Sure, in the old days we used text style for that, but I gather that's not even a thing any more.

At this point I'm inclined to call this "by design". Sure, somewhat different from 2.x in that hairpin lines now respond to hairpin height rather than dynamic height, but that's not inherently wrong. Does someone have a case that shows why a change is needed?

Title crescendo/diminuendo lines not placed well if no dynamic marking present on start note crescendo/diminuendo lines take vertical height from hairpin settings rather than dynamics text settings
Regression No
Workaround No

(also changed issue title to reflect what is actually going on - for 2.x they obeyed dynamics text height, for 3.0 they obey hairpin height, I think that actually makes more sense, although I'm sure I had a reason for doing it the way I did originally)

Priority P1 - High

OK, now that I look further, I see this really is a problem. The default height for hairpins is deliberately set to be 0.5sp higher than for dynamics, so that they will align on their vertical centers, and this does work correctly in both 2.3.2 and in 3.0. That 0.5sp offset is, I think, why I didn't just use the hairpin height for the hairpin lines - these are aligned based on the baseline, not on the vertical center. Using the dynamics text style solved that nicely.

Now that text styles are back, we could elect to use the same approach, or maybe solve it in how we do the layout. Like, what if we made the hairpin height setting the same as the dynamics height, but during layout offset the hairpins by half their height, or something like that? Having that hardcoded 0.5sp discrepancy in the style settings has always seemed a bit kludgy anyhow.

Here is the problem:

hairpin-line-height.png

Select the first hairpin in Marc's example, and use the Inspector to change the Type (in the "Hairpin" section) from "Crescendo Hairpin" to "Crescendo Line". This is the result.
hairpin.png
The text is aligned with the dynamics, but the line is not aligned with the baseline of the text.

Although I wrote much of the original code for these elements, and I do know a thing or two about style settings, there is a bit too much going on here in terms of the "property" settings for me to feel comfortable attempting to fix this.