XML Import fails

• Jun 30, 2014 - 23:10

Hello all, I am attempting to import MusicXML files after having done some work with musical data using humdrum and music21. One example file is attached. It is the result of running the .show() command on a humdrum file. When I open it in MuseScore (v. 1.3 for Ubuntu) it fails to create the score. Any ideas of what is wrong?

Attachment Size
tmpRL0X8V.xml 4.98 KB
Screenshot from 2014-06-30 18:12:24.png 251.78 KB


Looking at the XML file itself with a text editor, I'm guessing the problem is that the "voice" tags are set to bogus values like 139644418368913. Could be a bug in music21 - is that the current version? I know there was a big recent update.

FWIW, it opens up just fine in the development builds of MuseScore (what will become 2.0) - looks like a I-V6-I cadence in C. So apparently 2.0 will be more forgiving of certain forms of bogus input. But still, seems this is worth reporting to the music21 folks - there is no reason it should be using crazy voice numbers like that.

In reply to by Marc Sabatella

I'm already a step ahead of you with the development builds... currently downloading the most recent linux build of MuseScore. I'm glad to hear it will work because none of the other linux-compatible notation software even comes close to MuseScore's capability. I will let the music21 folks know about the weird voice values.


In reply to by nikrepka

Be aware that MusicXML import in general is not necessarily working so well in the current development builds. There were some big changes in how pitches are represented internally a few months ago (to better handle transposing instruments) and I don't know that the MusicXML import facility has caught up yet. But it's on the "to do" list before 2.0 is released. So don't panic if things seem wonky, but do report any problems. In general, the MusicXML import and the layout facilities should both be *much* improved in 2.0, so if you're looking for a way to render scores generated in music21, you're definitely looking in the right place. LilyPond is the only program that will potentially generate better looking results (although I think we have closed the gap considerably over the past few months). But I believe the MusicXML -> ly conversion may be the weak link in that chain.

In reply to by Marc Sabatella

In MusicXML voice names are simply strings. I believe this was done to enable named voices ("hauptstimme", "nebenstimme" etc). Voice 139644418368913 is legal but highly unusual.

MuseScore 1.x (incorrectly) assumes voice names are small integers (which is what they typically are). This was fixed in the nightly builds some time ago.

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