Implement collision avoidance between rests and notes/rests in other voices

• Nov 21, 2018 - 19:31
Reported version
3.0
Priority
P1 - High
Type
Functional
Frequency
Few
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project

Collision-note-rest-voices.png

OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.0.0, revision: 3543170

Repro steps

  1. Create a new score
  2. Press F to enter a quarter F
  3. Select all and exchange voice 1 and 2 back and forth
  4. Select the measure rest in voice 2 and hit 0 to enter a quarter rest in voice 2

Expected: The quarter rest is moved down to avoid collision
Actual: The quarter rest collides with the note

Workaround: Move the rest manually

Attachment Size
Collision-note-rest-voices.mscz 2.34 KB

Comments

Title Collision of rest and note with voices Collision of rests and notes in different voices
Severity S5 - Suggestion S3 - Major

This also affects imported 2.x scores. IMV, it's a bug.

Priority P2 - Medium P1 - High
Severity S3 - Major S5 - Suggestion

Well, it was never designed to work, never worked in any previous release, so it's not a bug in the usual sense of the word. It's simply a feature that has never been implemented. Obviously, though, it's one people might reasonably expect to see, and it's a very good idea to implement some day, regardless of what one calls it. So, it's a high priority suggestion. Please don't change these fields.

If it had worked in a previous release it would be a regression. This is not a criteria for bug or not. For example the not selectable instrument names have been working in 2.x but are declared as designed in 3.0, not bug.

But the main feature of MS 3.0 is automatic placement of all sort of fancy staff. In this view a not working automatic placement of such a basic thing as a rest is a bug, IMO.

Title Collision of rests and notes in different voices Rests: implement collision avoidance between rests and notes/rests in other voices

+1. This should be extended to imported 2.x scores as well.

Title Rests: implement collision avoidance between rests and notes/rests in other voices implement collision avoidance between rests and notes/rests in other voices
Title implement collision avoidance between rests and notes/rests in other voices Implement collision avoidance between rests and notes/rests in other voices

Avoiding collisions is always good, of course. The only question would be about exactly how to avoid them - how much to move things, which things need to be moved in addition to remain aligned, etc. For example, in the original example here, simply moving the quarter rest on beat 1 might not be ideal, then it wouldn't align with the other rests in that measure. But maybe sometimes that's OK. There would really be a need to consult different engraving experts, published music, etc, to understand what's ideal. Gould doesn't go into a lot of detail here, but on p. 36 does suggest that you align rests that represent part of the same beat, also try to align them with other notes in that voice. It definitely looks to be more an art than a science.

Chen Lung thankfully pointed me to some pages in Behind bars

  • p .35, rests always move in whole multiples of spatium.
  • p. 36, collision avoidance for beams above rests: Not implemented.
  • p. 36, when one part is outside the stave, the rests move back to the center.
  • p. 37, parts share a rest wherever possible
  • Gould's examples have bigger distance between rests and notes as in this PR. This is due to

The current implementation may be not perfect. But it solves 95% of my scores automatically. Especially when toggling concert pitch with large transpositions it proved very helpful. And of course the automatic avoidance always can get manual corrections.

I can add some improvements according to the above list.

Fix version
3.5.0