Creating joined score with less instruments/staves in subsequent scores vs. the first yields corrupt score
To reproduce, create and save two new scores with different numbers of parts. Go to File -> Album…, click New, and click Add Score twice to add the two scores to the album. Click Join Scores and save to any location. When you open the joined score, MuseScore 2 will find durations of 0/1 and open with the warning "File corrupted." What's happening is that additional staves are created to maintain the same instruments throughout, but the newly created measures are not filled with rests. Instead, they're entirely empty—the worst kind of corruption short of an unopenable score.
Comments
That is why having a different number of parts in score to be joined on an album is not supported. It doesn't work at all if the 1st score has less staves than the subsequent ones.
I think it can get fixed bug selecting the corrupt stave and swap voice 1 and 2 twice
OK, but:
https://github.com/musescore/MuseScore/commit/a6735b7a9c42ac53640fb1aab…
We could either change back to simply not allowing it, or make sure we fill the measures on the staves that did not exist in the original. That is probably a bit more painful that you might think, as we would need to deal correctly with measures where actual duration differs from nominal duration. In principle, it is not unlike adding a new staff to a score, so maybe there is a way to leverage that code.
Guilty, your honor ;-)
And yes, adding the missing rests would be really good
BTW at that time there was no corruption check, and thanks to "hide empty staves" the problem wasn't visible
My use case is a songbook of some 400 songs, some in treble clef and some in closed score SATB form.
Another thing an album join should/could do is to take care of instrument changes, now.that we have this feature.
Yes, I see now that if the first score has fewer instruments, then MuseScore "encounters an error" instead of making a corrupt score. I think it wouldn't be a terrible solution to have the same behavior if the scores are ordered differently, though the error message should be more descriptive.
Just adding the missing rests would kill several birds with one stone...
One workaround is to use 'hide empty staves', score would still be reported as corrupt, but you won't see the corruption ;-)
The easiest way to fix the corruption is Ctrl+A, Ctrl+Shift+Del, this creates full measure rests in all empty measures.
Calling the corresponding function, Score::cmdFullMeasureRest() might be the way to fix this in the code?
Given the relative easy workaround to fix the score, the fact that this restriction is documented in the handbook and the probably rare cases where this issue would arise, I think we can lower the priority to Major.
The Mac version of that "full measure rests in all empty measures" shortcut is four keys long: Fn+Cmd+Shift+Delete. I've updated http://musescore.org/en/node/54721 correspondingly.
Thanks
Fixed in branch master, commit d73b6781ad
fix #65996: Creating joined score with less instruments/staves in subsequent scores vs. the first yields corrupt score
Fixed in branch 2.0.2, commit e3162c2dc1
fix #65996: Creating joined score with less instruments/staves in subsequent scores vs. the first yields corrupt score
Automatically closed -- issue fixed for 2 weeks with no activity.