Whole rests causing problems in XML import

• Feb 25, 2020 - 18:14
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

My ultimate goal is to create lead sheets in muse score based on MIDI data from Logic Pro X.

I've been exporting .xml files from Logic and importing them into MuseScore...

The first song I'm doing starts in 7/8 time, and ends in 4/4.
The first 18 measures of the song are rests in 7/8 time. However, MuseScore puts whole rests in these measures. This becomes an issue when I try to copy/paste the staff (it adds half a beat to each measure of rest, and then first note comes in 9 beats late). This isn't terribly surprising, so I figured I could fix this by selecting the first 18 measures and deleting the rests... I thought the whole notes would be replaced by, perhaps, seven 8th rests. No, it's replaced by a quarter rest and a half rest, as if it were a 3/4 or 6/8 measure. What?!

I can't find any sort of workaround. Logic Pro's scoring is to primitive, so I'm pretty sure it has to be fixed after exporting it from Logic Pro. I'd be interested even in a plugin or Python script or something that will replace the full measure rests with an appropriate number of 8th rests.

Any known solutions?

Sounds similar to this post:
https://musescore.org/en/node/51611

Attachment Size
Sweet Surrender - melody -full.mscz 29.37 KB

Comments

Can you attach the MusicXML file you are importing? I tried creating a score in 7/8 and then importing it, and it worked as expected when I imported it - I got "measure rests", not "whole rests", and copy/paste worked just fine. So I suspect Logic might be creating incorrect MusicXML. There might well be a way to correct the error after import. The score you attached shows measure rests, not whole rests, but unfortunately it also shows the duration of the measure being only 6/8 despite the time signature (see the "-" icon above the measure, then right-click the measure and check Measure Properties / Actual duration). You could fix this by changing the actual duration to 7/8. Or just delete the measure completely (Ctrl+Delete) and add it back (Insert).

Here's an example file. Digging through the .xml code show's what's going on. Here's an abbreviated version of the code for the first measure.

<measure number="1" width="134">
...
<attributes>
<divisions>1</divisions>
...
<time>
<beats>7</beats>
<beat-type>8</beat-type>
</time>
...
</attributes>
<note>
<rest/>
<duration>3</duration>
<voice>1</voice>
<type>whole</type>
<staff>1</staff>
</note>

You can see that the problem is with the .xml file, divisions=1, duration=3... and duration has to be an integer value, so we can't get 7/8 without changing "divisions" which will break a lot of stuff that's not broken. yikes.

Attachment Size
Sweet Surrender - melody -full.xml 248.92 KB

As far as I can tell, that's just the wrong XML to have generated - the problem is with the program that generated it. See how MuseScore exports 7/8 for a more correct (as far as I know) implementation. It sets divisions 2, duration on the rests 7. As far as I know, it's just crazy talk to use divisions = 1 for a piece in 7/8.

Status active needs info

I'm marking this "needs info" because I acknowledge I am no expert in MusicXML. So maybe someone else with more experience can chime in. But according to my read of the standard, we are doing the best we can given the input.

In reply to by Marc Sabatella

Indeed the file is encoded incorrectly. For a 7/8 time signature, divisions must be a multiple of 2. Please report this to your supplier.

Note that the divisions value changes to a correct value for the parts of the file where (non-rest) notes are present. The issue is only with the whole-measure rests. This is easily fixed in MuseScore: simply select and delete the offending measures and insert new empty measures.