Bounding box for diagonal lines is too big
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
- Open the attached file.
- Select the hairpin in measure 4 and check the "Allow diagonal" box.
- 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
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:
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 This isn't really a bug,… 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.