Bounding box for diagonal lines is too big

• Oct 8, 2019 - 11:10
Reported version
3.2
Priority
P2 - Medium
Type
Functional
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
Yes
Project

MS 3.2.3

  1. Open the attached file.
  2. Select the hairpin in measure 4 and check the "Allow diagonal" box.
  3. Now drag the right tip upwards.
    Expected result: Left end of hairpin should be static, or move very little.
    Actual result: The left end moves downwards as the right end is dragged upwards.

Workaround is to turn off autoplacement, adjust hairpin, turn on autoplacement again and reposition.

Attachment Size
moving_hairpins.mscz 22.54 KB

Comments

Title Diagonal Hairpins don't tip up/down correctly Bounding box for diagonal lines is too big
Severity S3 - Major S5 - Suggestion
Priority P2 - Medium

This isn't really a bug, just a limitation in how we computed the "bounding box" for hairpins. The reason the left side moves down in this particular case (it doesn't in other cases) is that automatic placement thinks there is a collision with the down stem on the first note of the measure. That's because it sees the hairpin as just a rectangle. The picture below should clarify:

MuseScore3_Em1y8EFB9m.png

Improving this would be good someday. Meanwhile, though, you can simply move the hairpin up. after making the change - no need to disable autoplace.

In reply to by Marc Sabatella

This could be another possible under-the-hood improvement for MuseScore 4 - to make the "bounding box" match the actual outline rather than using a rectangle. AFAIK Lilypond does this. I'm don't know how complicated it would be to implement, and hence if the benefit would be worth the effort, but I'm just putting the thought out there. Perhaps it could be useful especially in tight spacing situations.

Indeed, we do this for beams - creating a series of little boxes to approximate the actual shape more closely - and it would be good to also do for other diagonal lines. No particular reason it couldn't be done, just takes a little work to get the math right.