XML import problems

• Mar 9, 2010 - 04:44

Working with ver. 0.9.5, 0.9.6 and nightly builds through r2860 in Windows XP SP3, I have had the following problem with XML import in every version:

Just to see how MuseScore would handle a large orchestral score, I attempted to import a piece I composed years ago that I'd done up in Sibelius 5 and exported to XML format. The piece has woodwinds in pairs, 4 French Horns, 2 Trumpets, 2 Trombones, Timpani, various percussion, and Violin I & II, Viola, Cello and Contrabass.

The original is 272 measures. MuseScore did fine for the first 51 measures but then proceeded to add mostly blank measures to a total of 3270! Playback ends at measure 51. When the slider in the Play Panel is moved all the way to the right it reads 152, but playback will not proceed beyond 51.

I know there are more important issues than XML import, but if MuseScore is going to promote XML import clearly there's much work that needs to be done. By the way, the xml file loads perfectly into both Finale Notepad 2010 and Notion 3, so I know the problem doesn't lie with what was generated from Sibelius.

Sorry to through this one at you. I looked through the forum but didn't see anything quite like this so thought you should know.


Comments

I have not encountered the problem you are describing.

In order to fix a bug the developers need to be able to reproduce the bug. Can you attach the MusicXML file to a comment below?

In reply to by [DELETED] 5

Ok. Will try the zip. I assume it will be ok and that there's not loss of significant data, though how it could go from 6.55 MB to 175 KB in the compression without loss, I don't know.. I'm also uploading the MuseScore file generated from the xml with the proper instruments assigned. XML import seems to assign everything to a single channel with the first MIDI instrument (usually piano).

I just tested the file out again and discovered that I was incorrect in stating it stopped playback in measure 51. It only appeared to because of blank measures. From that point (actually around measure 70 in the score - there is a discrepancy between the score measure numbers and the Play Panel's measure count), only the flute parts are written out. And when it reaches the official end of the piece, measure 272 in the original score, MuseScore continues to spin out a couple thousand more measures. Perhaps the discrepancy in the measure count is due to the mixed meter throughout the piece?

Another thing you will notice in this is hairpins (crescendo/decrescendo) stretching apparently across the entire score.

The main issues here are the dropping of all the instruments other than flute and the addition of all the extra measures.

This is by no means a complex score, very neo-romantic (done back in my college days) with the only challenge being the mixed meter. I assume you have something like Sibelius or Finale (even Notepad) you can load this into to see what it's supposed to look like?

Attachment Size
celebration overture.zip 175.41 KB
celebration overture.mscz 371.74 KB

In reply to by Norman Lowrey

Several issues, not sure which one(s) need to make their way to the bug tracker...

  • Piano sound: All the parts are played with piano because there is no indication of other MIDI instrument in the MusicXML file. When you open it with Sibelius, sibelius tries to assign instruments based on the staff name
  • Empty measure. Some measures have a 3/4 time signature and contain only a eight notes. See for example measure 9 Part 2
  • Crescendo/Decrescendo: This one is less clear, but the because of the previous bug, the timing is not good, so it may cause problems to get when the crescendo has to stop
  • Some tuplets are just not good. Again there are tuplet with not equal duration for each element (like 110 & 112 in a septuplet)

In reply to by [DELETED] 5

I wasn't faulting MuseScore for its interpretation of instruments from XML. The same thing happens in other programs.

Your suggestion of the problem being related to missing rests makes sense except that other programs (Sibelius, Finale Notepad 2010 and Notion) read the xml file without any problem. I went ahead anyway and redid the original score to make sure all measures had the proper rests.

The same thing occurred when I imported the file into MuseScore 0.9.5. Only flute part after measure 72. Extended hairpins. When I tried importing it into the most recent nightly build I have (r2860), the program crashed.

I think I'm going to give up for now on this and just use MuseScore for the class I'm teaching, which is at a pretty basic level.

Thanks for your help and I'll continue to stay in touch about other things as they emerge.

In reply to by [DELETED] 5

Can't resist to comment ...

No matter what issues are present in the MusicXML file, MuseScore should do its best to import it in the best possible way. Given the complexity of the MusicXML specification and the fact that no reference implementation or validation suite exists, we probably will have to live with less than ideal MusicXML implementations for quite some time.

All we can do is be grateful for every bug report, take every issue serious, investigate and fix them. It will just take a lot of time and effort.

Regards, Leon.

In reply to by [DELETED] 5

Ok, I said I was giving up on this for now, but I got to thinking about how I might be able to narrow down the problem. I cut back to a couple pages, then added back a page or two at a time until it started getting off.

You''re right about the tuplets being an issue. MuseScore's interpretation of septuplets is what throws it off. The first instance is on page 7 of the original score where there is a beat of 8th note septuplet. Finale and Sibelius handled this ok, but maybe that's what you were referring to as "tuplets with inequal duration?" On page 13 and 14 are the first proper 16th note septuplets, but that's where the real problem begins. As soon as it hits those, MuseScore adds measures.

I don't know what you mean by "measure with time signature different from the actual content". unless you're referring to the way things look in the MuseScore rendering. Except for that possible measure with the 8th note septuplet, the original score has no descrepancies between the time signature and the beat content.

I've included my test files with the xml's, and Finale Notepad .mus files which were derived from the initial full xml file and which I used to generate the xml examples.

I haven't tried creating a septuplet in MuseScore. I'll give that a try when I get a chance.

Oh yes, I was using r2862.

Hope this helps somehow. I don't envy you the coding of any simple notational protocols let alone juggling around among different systems.

Attachment Size
Celebration Overture.zip 341.65 KB

In reply to by [DELETED] 5

Some investigation shows that MuseScores MusicXML import currently requires all corresponding measures in a multi-part piece to contain the same number of beats. If this is not the case, for some measures the starting tick cannot be found and these measures are appended at the end. This causes a large number of empty measures to be created.

Tuplets with unequal duration or rounding errors in the duration calculation probably lead to the same result.

Even though I cannot understand why one would have four quarters in one part and three quarters in the same measure in another part, MuseScore should not create empty measures. This is certainly a bug. I haven't found an easy fix yet, so fixing this bug may have to wait until after 0.96.

Two simple example files illustrating the problem are attached. Both contain three measures, but as of today, for both files MuseScore creates five meaures including two empty ones.

Attachment Size
irregular1.xml 7.04 KB
irregular2.xml 7.03 KB

In reply to by Leon Vinken

Yes, thanks. I had discovered these two things the last time I had a chance to work on this issue a couple days ago. I kept paring back measures in that score I'd sent in with the problems and found first that by changing the septuplets to a 16th note triplet and four 32nd notes, the xml import didn't add measures. There were also some nonets(? - nine 16th notes in a beat) that would result the same addition of measures. When I changed those to eight 32nd notes, all was well.

In doing this scrutiny (I think I ended up redoing about 60 different files), I also alas found several odd measures here or there that had 8th or quarter rests missing. I had though I'd caught all of those but clearly didn't. When I filled them out properly other additional measures added on the xml import disappeared.

So MuseScore is not very forgiving for missing rests and odd tuplets! I wonder how the other programs handle those situations.

The one remaining little puzzlement in my score is the occurrence of extended hairpins. Some of them cleared up, but others continued. I wasn't in the time I had able to track that one down. When I get a chance I'll give it another try.

Do you still have an unanswered question? Please log in first to post your question.