Misunderstanding how scores are encoded
I am writing an application that modifies scores outside of MS, and I have encoded something which MS interprets wildly different than what I expected. See the attached score, 2nd staff. When I open it in MS (3.6 and 4.0) it shows 5 quarter notes in the first measure, and 7 in the third, with a half rest. But the XML, unless I am reading it wrong, has 8 8th notes in the second measure, and 4 8th notes plus a half rest in the 3rd.
What have I done wrong?
Attachment | Size |
---|---|
Test2.mscx | 20.09 KB |
Comments
Use
eighth
instead of8th
for the duration-type.Take note that mscx is an undocumented format; your tools might be better suited (or more universally useful) when written against MusicXML; which does have a published standard.
In reply to Use eighth instead of 8th… by jeetee
can MS read those too?
In reply to can MS read those too? by Duncan124
MuseScore can export to and open MusicXML files, yes.
In reply to MuseScore can export to and… by jeetee
Hmm looks viable, there are some formatting elements that might cause issues but I will give it a try, the format does seem cleaner to work with.
More importantly though, is it possible to create a plugin that will save and load musicxml with a hotkey? I have to constantly save and load and doing that through the export menu would be more trouble than it is worth.
In reply to Hmm looks viable, there are… by Duncan124
For MS4 the loading of a score (as mentioned a few times by now) is not yet functional.
But for 3.6 you can writeScore() closeScore() and readScore() which should work out for you: https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…
In reply to For MS4 the loading of a… by jeetee
can that do musicxml though?
Edit: ok the docs suggest it does. Perfect. Thanks guys