Incomplete voice in local time signature leads to corruption upon import
Reported version
3.1
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project
Opening the attached MuseScore 2 file in MuseScore 3 gives the following warning:
Bar 133, stave 1, voice 2 too long. Expected: 3/4; Found: 9/8
Bar 133, stave 3, voice 2 too long. Expected: 3/4; Found: 9/8
Bar 136, stave 1, voice 2 too long. Expected: 3/4; Found: 9/8
Bar 136, stave 3, voice 2 too long. Expected: 3/4; Found: 9/8
However, the MSCX code for the measures in question appears to be valid.
Observations
I tried deleting all measures in MuseScore 2, keeping only a small section around the problem measures. However, I found that the error was no longer displayed when importing into MuseScore 3, so the problem seems to be a special case with this large number of ticks.
Fraction calculations have recently been simplified. Before this happened the error was:
Bar 133, stave 1, voice 2 too long. Expected: 6/8; Found: 54/48
Bar 133, stave 3, voice 2 too long. Expected: 6/8; Found: 54/48
Bar 136, stave 1, voice 2 too long. Expected: 6/8; Found: 54/48
Bar 136, stave 3, voice 2 too long. Expected: 6/8; Found: 54/48
This version of the error was displayed even before the switch to Fractions from integer ticks.
Attachment | Size |
---|---|
Mercury_extract.mscx | 399.02 KB |
Fix version
3.6.1
Comments
The problem is probably related to the presence of local time signatures in bar 80 (Harp 1) and bar 99 (Harp 2).
Here is Staff 1, Measure 133:
Here is the MSCX v2 code:
Observations:
Both of those are valid in MuseScore 2's MSCX, as demonstrated by the attached example which imports fine in MuseScore 3.
Here is a simpler example that demonstrates the problem. It seems to occur only when:
Pretty strange results in 3.6 (on Mercury_extract.mscx):
Simular on that other score:
These bogus messages are a 3.6 regression, not happening in 3.5.2 and as such probably earn me a brown bag, for fbe6949. Quite strange though, as that change is in 3.5 already, but only in 3.6 causes that bogus output? https://github.com/musescore/MuseScore/pull/7267 should fix that message (bit not the issue at hand here)
Regarding the issue at hand, it is true that the scores are not corrupted originally, but they become corrupted upon load when gap rests are added for the purpose of filling in incomplete voices. The durations of the gap rests are incorrectly determined based on the length of the measure in terms of the global time signature, rather than the local time signature.
The error is here. It should be
where
f
has been defined earlier to be equal toticks() * stretch
, which is the length of the measure in local ticks.Making this change allows the rests to be created with the correct duration, meaning that the scores are no longer reported as corrupted upon load.
Are you going to PR this?
See https://github.com/musescore/MuseScore/pull/7278.
Fixed in branch 3.x, commit 6484f5e96b
_Fix #284796: Incomplete voice in local time signature leads to corruption upon import
Resolves: https://musescore.org/en/node/284796.
Part of the process for verifying the internal integrity of a measure is to create gap rests when any of the voices in the measure are incomplete. The duration of the gap rest was incorrectly determined based on the length of the measure in terms of the global time signature, which caused a problem in the presence of a local time signature._
Fixed in branch master, commit 3afd1b1f1a
ported #7278 : Fix #284796: Incomplete voice in local time signature leads to corruption upon import
Automatically closed -- issue fixed for 2 weeks with no activity.