Rest auto avoidance flawed
Reported version
3.5
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project
In the score bad rest avoidance.mscz in measure 13 the measure rest has moved automatically to line up with the A ledger line. I would like it attached to the bottom of the E line. This is marked as major because I can't make the rest move back to the E line.
Here'a a picture of measures 12-14
Fix version
3.6.0
Comments
Confirmed, and a regression vs 3.4.1
Probably related to #278538: Implement collision avoidance between rests and notes/rests in other voices and its fix from https://github.com/musescore/MuseScore/pull/5897
Sorry for the late answer. This came just now to my attention.
For compatibility reasons, Marc Sabatella suggested to apply the automatic avoidance only if there is no offset adjusted. Hence the placement for offset 0 is fundamentally different as for offset 0.5 for example. If you want to get the rest to E line, try to adjust the offset to 0.01sp.
I'd call that a workaround
Please could you have a look at https://musescore.org/en/node/306821
There you find the original implementation and the changes suggested by Marc. Do you have any idea how to solve this?
You mean #306821: Huge spaces between music staves and tablature with offset rests in voice >1 ;-)
Which in turn leads to #278538: Implement collision avoidance between rests and notes/rests in other voices
There we had a collision between quarter note and quarter rest, here we don't have a collision between a half note and a full measure rest
In principle you should be able to distinguish an offset of 0 from no offset applied. No offset would have property flags set to styled. Except, this isn't a styled property, so I guess that's not a thing. To me this is an architectural flaw (unless I'm missing something, which is possible), but probably not your job to fix.
I would recommend disabling the collision avoidance if autoplace is disabled, though, because that's the first workaround I'd have tried.
The offset is not styled. So this is not applicable.
But disabling collision avoidance when autoplace is disabled is a possible solution.
Turning off auto placement to allow it where the user wants it would be an acceptable fix to me. That was the first thing I tried.
I will point out that if you put the measure in question on a line by itself, auto avoidance still happens even though there is no collision taking place and that is a fundamental flaw in the design.
Full measures rests are treated pretty specially to get them to center. Most layout is done before the final width of the measure is settled, the centering happening after all stretch is applied. So the position of the full measure is not known when most of the layout work is being done. Apparently the algorithm currently displaces them if anything in the upper voice encroaches on its vertical position, which is probably the most reasonable compromise to deal with this particular quirk of full measure rests.
Relates to #311175: [EPIC] Engraving issues and suggestions
Edit: https://github.com/musescore/MuseScore/pull/6746
Should actually be
https://github.com/musescore/MuseScore/pull/6746
Fixed in branch 3.x, commit 39a9582846
fix #309040: Apply rest collision avoidance only when rests auto placement is enabled
Automatically closed -- issue fixed for 2 weeks with no activity.