Rests grouped incorrectly after adding 256th note or smaller

• Feb 12, 2021 - 20:29
Reported version
3.6
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project
  1. Enter a 128th note at the beginning of a 4/4 measure. Notice that the rests are correctly grouped from smaller to larger.
  2. While still in note input mode, press Q to change the duration of the selected note to a 256th note.
  3. Place a new 256th note on beat 3 (replacing the half rest).

Expected result:
The rests following the 256th note on beat 3 are grouped from smaller to larger.

Actual result:
The rests following the 256th note on beat 3 are incorrectly grouped from larger to smaller.

  1. Perform the Regroup Rhythms command from the Tools menu. Notice that the rests are still incorrectly grouped from larger to smaller.

Comments

Status PR created fixed

Fixed in branch 3.x, commit b014c094f3

_Fix #317426: Rests grouped incorrectly after adding 256th note or smaller.

Resolves: https://musescore.org/en/node/317426.

The functions that deal with rhythm grouping operate on integer ticks, but they are smart enough to realize that integers can only be split in half so many times. If and when this limit is exceeded, populateRhythmicList gives up trying to group rhythms based on subbeats, and simply appends the result of toDurationList() to the current duration list that is being built. But toDurationList() returns a list that is ordered from largest to smallest, so it really ought to be appended in the reverse order._