Documentation for the mscx format?
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.
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.
Do you still have an unanswered question? Please log in first to post your question.
Comments
No, it is not documented.
If you need a fully documented format, use MusicXML
In reply to No, it is not documented. If… by Jojo-Schmitz
Alright, I'll see if I can understand enough of the format by trial and error. With MusicXML I can't get the precise notation I want.
Are the objects I can access in plugins documented? Maybe I can do MusicXML + touch-up with a plugin.
In reply to Alright, I'll see if I can… by emilianoheyns
Yes, plugins should be fully documented.
In reply to Yes, plugins should be fully… by Jojo-Schmitz
I may be looking in the wrong place -- I'm trying to find the tickLen (https://musescore.org/en/handbook/developers-handbook/plugin-developmen…) but the chords don't seem to have them. I'm also looking for how to hide flags and set the stem direction on notes.
In reply to I may be looking in the… by emilianoheyns
I highly doubt you're writing a MuseScore 1.x plugin..
In reply to I highly doubt you're… by jeetee
Fair enough, missed that, but then I've been unable to find the 3.x plug in docs.
In reply to Fair enough, missed that,… by emilianoheyns
If you click through on the "Click here for Documentation for 3.x" link on that page, you're moved to the next page. Which in turn shows "Full featured documentation is available in Doxygen format.". Clicking that link takes you to https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/index… which holds the current API documentation
In reply to If you click through on the … by jeetee
Ha, super, thanks.
In reply to Alright, I'll see if I can… by emilianoheyns
Can you explain what limitations you are running up against in MusicXML? It's certainly possible it would be something we could consider supporting better in the future.
In reply to Can you explain what… 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 I'm using MuseScore for drum… by emilianoheyns
If you explain in more detail, we can help. In principle there shouldn't be anything about drum notation that can't be modeled using MusicXML.
In reply to If you explain in more… 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.
In reply to Oh super, sure; the main… 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 I'm not understanding why… 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 Good point on the right-hand… 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 I don't know what you mean… by Marc Sabatella
Yes, sorry, quarters and eigths. I still mix up these things.
Yes, I suppose the sheet music he gives me is incorrect, but they're not files. He hand-writes them.
In reply to Yes, sorry, quarters and… 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 OK, now I'm really confused… 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 Any confusion caused is… 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?
In reply to Sorry, I forgot to answer… by emilianoheyns
One other thing then -- when I enter the notes as quarters instead of eights + rest, the fill measures don't line up. I find it easier to follow if they line up. Is that possible?
In reply to One other thing then -- when… by emilianoheyns
I'm not understanding what you mean about not lining up. What do you want lined up with what? Both versions look pretty much identical to me aside from eh unnecessary hidden flags and rests.
In reply to Sorry, I forgot to answer… 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 Where in measure 7 do you… 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.
In reply to Yeah so the issue with the… 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 Oh, indeed, MuseScore uses… by Marc Sabatella
Super, thanks
In reply to Can you explain what… by Marc Sabatella
I'm currently also hitting https://musescore.org/en/comment/1039830#comment-1039830, so I can't generate and then import MusicXML. edit: looks to be connected with renumbering measures. If I don't do that, musicxml imports just fine.
In reply to Can you explain what… 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 do apologize for not doing my homework before I started this thread.
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 I've found that it's not… 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 The problem with using MSCX… by Marc Sabatella
Agree, as a general practice. However, as I posted on Jun 9, 2023, MusicXML export/import messes up multiple tunes with titles on a single page, so I have no choice but to continue working with MSCX for the time being. I just confirmed this MusicXML (mis)behavior on MU 4.21
In reply to I've found that it's not… by BanjoJake
3.7 does open Mu4 scores. Of course this isn't completly lossless though
In reply to 3.7 does open Mu4 scores 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 True. My point was a bit… 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 !
In reply to Actually, after taking… by BanjoJake
The problem as I understand it is that MusicXML does not support anything like a frame between systems, so there just just isn’t a good way to represent that.
I made a tool some while ago which helped me to reverse engineer the MS3 mscx format.
https://github.com/yonah-ag/musescore-mscx-explorer
https://musescore.org/en/node/323083
I also found this plugin very useful:
https://musescore.org/en/project/element-analyser
Sometimes it is useful to work directly on the mscx format to achieve things that are not possible in the UI.
In reply to I made a tool some while ago… by yonah_ag
Thanks, downloaded both, will check them out ! Meantime, I'm able to get by teasing out specific details by inspection as needed.
In reply to Thanks, downloaded both,… by BanjoJake
The plugin API documentation is also very handy as you can see all the object properties and also how the object hierarchy is structured.
https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/annot…
Spanner tags puzzled me until I realised that they are 'labels' to create spans (or ranges).