Extra (and incorrect) rests added to voices break LilyPond

• Nov 8, 2010 - 16:04
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Operating System: Windows XP-sp3
MuseScore Version: 0.9.6.3 and Nightly 3687

When voices have different timing on the same staff then superfluous incorrect rests are added for some reason. The rests added to voices other than voice 1 may apparently be deleted, but they come back again very easily (for instance by exchanging voices). The rests added to voice 1 cannot be deleted and can only be made invisible. This may be OK for printing directly from MuseScore but unfortunately even though invisible they are still included in the LilyPond output and break it badly.

Look at all the rests in the attached score. Not one of them should be there. In this piece all of the measures for all four voices are complete without any rests - so all the rests that have been added are incorrect! Why are undesired and incorrect rests being forced into the piece?

Attachment Size
TheChristmasChildPiano.mscz 4.49 KB

Comments

I don't see that the content of the exported LilyPond file has much to do with this bug. The problem is very apparent long before trying to export to LilyPond. How can one have 5/4 worth of time in a 4/4 bar!? But that is exactly what MuseScore insists on creating. There is no surprise that LilyPond gets upset when faced with such a contradiction.

Here is a simple way to demonstrate the bug:

1) In a single bar of 4/4 time, create two voices of 4 crochets each, starting say on the same central note and separating in contra-motion. I have attached "RestsBug1.mscz" with this structure. This works perfectly well if exported to LilyPond.

2) Now delete the third crochet of voice 1 (a crochet-rest is correctly created in its place) and replace the second crochet with a minim (the crochet-rest correctly disappears again). Now select the bar and exchange voices 1 and 2 (all is fine so far). Now select the bar again and exchange them back and the bug appears - an incorrect rest is forced into voice 1. I have attached "RestsBug2.mscz" to display the result.

If you look you will see that the crochet rest really should not be there as there is a minim there to fill out the measure. Voice 1 now has 5/4 worth of notes in a 4/4 bar - and the superfluous crochet rest cannot be deleted. If this example is exported to LilyPond then of course LilyPond gets upset. If you exchange voices 1 and 2, then the crochet rest can temporarily be deleted, but if you exchange them back again then the superfluous rest is created again.

I don't think you have to look at the LilyPond export to fix this bug - just prevent MuseScore from creating these invalid rests!

Attachment Size
RestsBug1.mscz 1.39 KB
RestsBug2.mscz 1.39 KB