Make individual beat rests when splitting a measure
Currently, when you "Slip a measure before current note," the result is 2 measures with measure rests. There is no indication on an individual part that this has happened and most (all?) scores use smaller rests to fill each measure as needed to show the two measures with fewer beats.
Both measures are also counted in the measure count, and one of them should automatically be excluded to prevent the measure count from being thrown off.
Comments
Came up in https://musescore.org/en/node/166036.
Affects 2.0.3 and master too.
IMHO part of the the measure that gets cut off, the tail end, is the one that should get set to be excluded from measure count
I agree with the feature request. The division of rests should remain the same before and after the split, since the only thing that the user has told the musescore to do is to "split" the measure, and there may have been deliberate reason why kept as separate measures. Merging multiple rests in to measure is something the user can always after splitting, by selecting all the rests in a measure and pressing delete.
FYI, I think (not sure, but just by looking over the code) that the following code ends up merging rests into measure rests: https://github.com/musescore/MuseScore/blob/28ace48040c4cdf46b3f5946592…
See also #183846: Splitting irregular measures produce extra rests
I haven't heard any objections to this feature request so I'm going to assume it's approved. I'll try a shot at implementing tomorrow since I've been looking at the code recently.
I'm also going to have individual rest elements other than Measure Rest elements be preserved after the split operation. I might add that to this title. Since they both affect similar code, it makes sense to implement in the same PR.
@mike320, I made a separate feature request for my request I mentioned in #2: #184356: don't merge rests for cmdJoinMeasure or cmdSplitMeasure. Keep original rest elements..
Now @mike320, I have a question about what do you think should happen when join two measures of measure rests? Should the result measure be contain just a measure rest of duration equal to the combined measure duration? Or should it break the rest up into smaller rests that add up to the total duration?
If the joined measure has a different duration than the time signature, the rests should indicate the actual duration of the measure.
Ok, will only create a single measure rest if the duration of the resulting measure equals time sig, but otherwise will break each measure rest from each measure into individual rests according to toDurationList().
Came up again in https://musescore.org/en/node/277294