Documentation for the mscx format?

• Nov 15, 2020 - 20:16

Is the mscx format documented? I'd like to generate drum scores for practice. Midi is easy enough to generate, but I want a specific notation for e.g. stem direction.


Comments

In reply to by Marc Sabatella

I'm using MuseScore for drum notation, which has (at least the version we use, it is my understanding others are around) some peculiarities wrt flag and rest display, and I don't know how to assign the drum soundfont in musicxml. One other option I'm considering is generating a midi file (where the assigned intrument does work), importing that, and then do touch-up in a plugin.

In reply to by Marc Sabatella

Oh super, sure; the main things I need is instrument assignment, and flag hiding. I start with percussion.musicxml, fix it to hide the flags and assign drumset, but when I export that to musicxml and re-import it, the flags are shown again, and the instrument is reset to piano.

Many thanks for the help! I've just started drumming, and MuseScore has been a great help.

Attachment Size
percussion-exported.musicxml 34.83 KB
percussion.mscz 6.51 KB
percussion.musicxml 18.82 KB

In reply to by emilianoheyns

I'm not understanding why you are trying to hide flags here. This makes them look like quarter notes, and hiding the rests just kind of sealks the deal. And of course, for percussion, the distinction between quarter note and eighth followed by eighth rest is normally meaningless. So why not simply enter these are quarter notes?

As for the export / import not preserving the drumset, that seems to be a bug. It seems this worked at one time, might have broken recently? I can reproduce this from scratch, just add a drumset staff, then export/import and the drumset info is lost. See #57751: Import of MusicXML file with no drum set info should assume reasonable defaults. It seems this used to be an issue only for incorrectly formatted MusicXML files, but now it seems to happen always - but only for playback, everything else is fine.

I just filed a new bug report on this - see #313095: MusicXML percussion staves get imported using piano sound. Luckily, it's only a temporary glitch, it fixes itself if you save and reload the score.

In reply to by Marc Sabatella

Good point on the right-hand 16th being just an eighth, but that still leaves the flags. WRT hiding the flags, this is the notation my teacher uses.

Cool, so a reload will fix this then. Awesome. I can understand flag hiding not being generally desirable, so I'll just apply that with a plugin. I don't want to deviate from what the teacher gives me right now.

In reply to by emilianoheyns

I don't know what you mean about sixteenth, the example you posted didn't contain any. Only quarter notes which for some unexplained reason you had entered and eighths and then hid the flag on to make it appear as a quarter. That makes no sense to me. It's a quarter,r why lie and call it an eighth with a hidden flag? There should be no reason to lie about durations, no reason to hide flags. Enter the notes with the correct durations and the flags take care of themselves.

So are you saying the teaching is giving you files with incorrect durations? If so, maybe gently suggest they correct this?

In reply to by emilianoheyns

OK, now I'm really confused. Are you saying he gives you a handwritten chart with eighth notes, but you're choosing to hide the flags? Or he is giving you a handwritten chart with quarter notes, and you're choosing to enter them as eighths but with hidden flags? I'm just not understanding what is making think that hiding flags makes sense. Maybe if you posted one of the handwritten charts I could understand better.

In reply to by Marc Sabatella

Any confusion caused is guaranteed to be caused by me - I really shouldn't be using jargon that I don't understand. All I can say is I tried to transcribe what he gave me, which, if I would have to guess at the terminology again, were one-measure grooves consisting mostly of eigths. When I entered them in musescore they sounded like what he played.

I can't find his notes anymore, I suspect I threw them out; when I showed him my transcription he didn't comment except to ask what I used, so I assumed them to be OK. I can ask him when I see him again.

In the notes he gave me there were rest marks where the 8th note was skipped for the right hand stroke, and not for the left-hand stroke, as a visual guide to keep rhythm. I realize I am without a doubt using the wrong terms again, but I don't know how else to explain it. I was just trying to recreate this because I forever loose paper notes, and musescore has been helpful in sounding out grooves, because I can't yet "hear" them from the sheet.

In reply to by emilianoheyns

Sorry, I forgot to answer one of your questions -- you're right, I was definitely using the wrong terminology, and that confusion is entirely on me, but the simple answer to the question "what were you handed" is that the attached file exactly replicated what he gave me. I think I understand your explanation better now, and yes, most of the eights on the snare and the bass should be quarter notes, not eights, that's not yet fixed in the attachment. But in measure 7, I am 100% sure that that is what it looked like, visually. One rest, with a note next to it without a flag. And if I understand correctly, that can't be anything else than an eight there, and that should have a flag then. Correct?

Attachment Size
Exercise.mscz 15.94 KB

In reply to by emilianoheyns

Where in measure 7 do you mean? The rest and bass drum on beat 3? That would appear to have been a typo on his part, it clearly should have been eighth, he must have forgotten to draw the flag. No reason to reproduce that error.

All the others places where you entered eighths and hid the flags and rests should have been entered as just quarter notes. Then everything would have worked right out of the box, no need to hide anything. And MusicXML would represent it perfectly.

In reply to by Marc Sabatella

Yeah so the issue with the flags is squarely my doing. The Excercises.mscz above has replaced them all with quarter notes, but the fills now look like in this screenshot, and eg the right-hand stroke notes (I am truly sorry, but I do not have other vocabulary for this) don't line up under each other as they did when I -- erroneously -- entered them as eights.

Attachment Size
Screenshot 2020-11-17 at 08.18.18.png 348.35 KB

In reply to by emilianoheyns

Oh, indeed, MuseScore uses traditional music spacing, where a quarter note does and should not take twice as much room as an eighth but instead something more like 1.5-ish times. So what you show here is correct according to standard music engraving practice. But for the special purpose of creating exercise sheets, it can indeed be useful to override standard spacing and instead go with one that helps make the pedagogical point. To get MuseScore to do this, simply enter invisible eighth rests in another voice.

In reply to by Marc Sabatella

Here's another example: MusicXML export/import messes up multiple tunes with titles on a single page. I have over a hundred contradance tune sets and to generate bass clef and alto clef versions, I have been programming against the MSCX. At some point, I'll need to decide whether to stick with MuseScore 3.6.2 or adapt my code to MU4 file format.

I've found that it's not that difficult to reverse-engineer the MSCX encoding. It's actually XML, and I've used Microsoft's Document Object Model (DOM) to make simple changes in the MSCX file that would have been too laborious to do manually in Musescore. You could program against MusicXML this way, of course, but exporting to MusicXML and re-importing to Musescore is not 100% faithful. I'm using v3.62 & v3.7.
(edit 5-May-2024: removed: " ... much easier (for me) to understand than MusicXML ..." )

In reply to by BanjoJake

The problem with using MSCX is you’re locked into one version pretty much, since this format changes many details without warning. MusicXML is a more fixed and very well documented format. Sure it evolves over time but smaller changes and much less often.

But the right approach depends on your final goal. For the vast majority of purposes that involve needing to edit raw text, most people are far better off working with MusicXML. But there might be some highly unusual special purpose things that can only be accomplished by resorting to editing to MSCX.

In reply to by Jojo-Schmitz

True. My point was a bit different though. if you write a program designed to do some sort of automated something based on MSCX format as it existed at 3.6.2 (or 3.7), that same program might not work anymore with MSCX format from 4.0, etc. Andf if you update the program to handle 4.x format, it gets increasingly harder to also support all older formats. Whereas MusicXML, in addition to be being far better documented, is also far more conservative with regard to changes, both in the actual spec and in how it is implemented in MuseScore. So a program that can process a MusicXML file generated by MuseScore 3.6.2 will likely work unaltered on MusicXML files generated by 4.3 and vice versa. None of this is guaranteed of course, but as a general rule, it's a good bet.

In reply to by Marc Sabatella

Actually, after taking another look at MusicXML, I do agree that yours is the best approach. That, of course, depends on a 'round-trip' MusicXML export-import restoring the original with high fidelity. In cases where that fails, does that constitute a bug ? Again, the example I posted Jun 9, 2023 is the show-stopper for me: MusicXML export-import messes up a page comprising multiple tunes separated by vertical frames (containing titles). Should I submit an issue in github for this ? It fails in v3.6.2, v4.2.1, and v3.7.0.8955604810. Thanks !

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