mscx with all data types

• Apr 29, 2018 - 00:31

Is there an musescore example file that contains all possible combinations of structured data? I want to test a JAXB unmarshal/marshal round trip of a score file from/to MuseScore. I notice a few tags in cpp files that I over-looked and want to be sure I have a complete JAXB representation (and xsd). I attach what I have thus far, which assumes input/output xslt on node that (unfortunately) have dup names. My goal is to eventually share this (via github) for any Java-heads who want programmatically edit musescore files.

Attachment Size
MuseScorexsd.xml 327.89 KB

Comments

No there is no description of the mscx format and there is currently no intent to create and/or maintain that.
We encourage people who want to do automatic score processing to base their tools on the MusicXML format; which is the music industry standard format for interchangeability.
That way, you have a clear specification to work against and as a bonus your tools should also work on files exported from other notation software.

In reply to by jamestomk

I'd suggest that particular MusicXML file was an aberration - in general, MuseScore does very well on both export and import. Whatever bugs you might run into there will be a tiny fraction of the number of bugs you'd be chasing trying to reverse-engineer and then keep up with every possible change and variation in the MSCX format.

In reply to by jamestomk

Two measures? The file I see there contains hundreds of measures. In any case, though it's not about the number of instruments or measures, but about the content. MuseScore correctly processes hundreds of thousands of MusicXML files, really it does. Your example just happens to contain some irregular tuplets involving extremely short notes - septulets of 64th notes and shorter (!) - and that seems to be what triggers the issue. The vast majority of scores export and import with no such difficulty.

In reply to by Marc Sabatella

I won't comment on the tone of your reply. I pointed you to https://musescore.org/en/comment/831273 (split_drums.xml, what are YOU looking at??) there are only 3 or 4 instruments EACH having two measures each! The file itself is only 2.3 MB uncompressed. It is therefore a rather trivial example of what won't import. Okay, so MuseScore works well for many many musicXML files. Please try not to take offense when someone points out a bug, and points out that they cannot always use MusicXML import successfully. As a (retired) software engineer, i know that by definition all code "still has one more bug somewhere". Thanks for your time. I hope someday this bug is fixed. My first (wild) guess is that it has something to do with DrumSet?

In reply to by jamestomk

That file, split_drums.xml, is indeed 2.3MB in size, it reports corruptions:

Measure 187 Staff 3 incomplete. Expected: 4/4; Found: 35865568/107520
Measure 188 Staff 3 incomplete. Expected: 4/4; Found: 35825248/107520
Measure 189 Staff 3 incomplete. Expected: 4/4; Found: 35825248/107520
Measure 278 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520
Measure 279 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520
Measure 280 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520
Measure 281 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520
Measure 282 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520
Measure 283 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520
Measure 284 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520
Measure 285 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520
Measure 286 Staff 3 incomplete. Expected: 4/4; Found: 35827040/107520

Which alone should prove that it has at least 286 measures, shouldn't it?
In fact it does have 367 measures, and as such is far from trivial. So what file exactly are you looking at, having 3 or 4 instruments with 2 measures each?

In reply to by jamestomk

I'm not sure what tone you were perceiving, but if you inferred anything but the helpfulness I intended, then I apologize for accidentally leading you astray.

Perhaps something went wrong on the server, but the files attached to your post have almost 400 measures. Perhaps you posted a long and a short example with the same name and somehow they got crossed? But I just tried downloading again, and once more got a file with almost 400 measures.

Anyhow, again, I don't doubt that a bug exists here. But my point is not that MuseScore is bug-free - of course not. As you correctly note, all programs of sufficient complexity have bugs. And that's precisely why I wouldn't expect a bug-free result if you try rolling your own, either :-)

As I mentioned, it seems pretty clear to me from the context that the bug involves some combination of extremely short durations (64th, 128th, etc) and tuplets. Probably the values simply exceed the defined minimum and rather than throwing up an error, we don't catch it until too late.

In reply to by jamestomk

I'm then slightly wondering if it wouldn't be more productive to fix the MusicXML import rather than reverse-engineering writeXML on the internals of musescore… It could be a win-win

But even if you don't have the time/energy/knowledge/mood/whatever to fix up musescore, please do continue to report any MusicXML-related (or other) bugs you encounter. Then someone can at their convenience work on it.

In reply to by jamestomk

My two cents (as the developer of most of the MusicXML import/export code in MuseScore):

The MusicXML file format is a lot more stable than MuseScore's .mscx format. As long as MuseScore is being developed, the .mscx format keeps changing. You would be trying to catch a moving target. Unfortunately, the MusicXML produced by MuseScore is not a perfect representation of all aspects of its internal state. Especially the layout information is typically incomplete. Also, it simply takes more time than I have available to fix all the bugs.

Even if you are not able to contribute code, it does help if you can test and report bugs. It would be even better if you could report bugs together with small files that trigger the bug. Many people who report bugs attach a huge file, which makes bug hunting like looking for a needle in a haystack.

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