Command line option to export .mpos and .spos files no longer works

• Dec 19, 2022 - 17:59
Reported version
S3 - Major


Up to and including MuseScore 3.6.2, it was possible to use the command-line to export various files from a score, using the -o option (midi, wav, mp3, png, ...)
Most of these types of export still work, but the export of measure and segments position files (.mpos and .spos files) however does NOT work any longer in MusecScore 4.0.0.

Steps to reproduce

  1. Preamble: I did this on Windows 10 Pro, but it most probably is the same on macOS and Linux as well. MuseScore 3.6.2 and MuseScore 4.0.0 are installed and work properly.

  2. Use the attached test score as an example (obtained from: )

  3. Open a command prompt and first try the export with MuseScore 4.0.0:

"C:\Program Files\MuseScore 4\bin\MuseScore4.exe" -o La_Llorona.mpos La_Llorona.mscz
"C:\Program Files\MuseScore 4\bin\MuseScore4.exe" -o La_Llorona.spos La_Llorona.mscz

Result: you do NOT get any output at all (.mpos and .spos files are not generated)...

  1. Then try the export with MuseScore 3.6.2:

"C:\Program Files\MuseScore 3\bin\MuseScore3.exe" -o La_Llorona.mpos La_Llorona.mscz
"C:\Program Files\MuseScore 3\bin\MuseScore3.exe" -o La_Llorona.spos La_Llorona.mscz

Result: you do get the expected La_Llorona.mpos and La_Llorona.spos files.

Relevant info

The original code for this functionality (in branch 3.6.2) was here:…
which then called into this code:…

This issue had already been discussed by another user of this functionality here:

In our case, we use these .mpos and .spos files in combination with the exported .png and .wav files to enable automatic score following on MuseScore files from live music performances in our desktop application "MusicFollower" (see SampleSumo website if you want more info, or ask me).
Not having the mappings of event IDs to locations on the images (which is what these files represent) basically makes it impossible to do our score following any longer (at least not with MuseScore 4), so for us this is a "breaking" change.

Request for fix (or alternative?)

Can this useful functionality be restored please?
Or was this functionality perhaps transformed into something else (with the big changes for version 4), and can it be obtained in another way now from the command line?
I assume this kind of mapping data is also used for the "cursor" animations of the web site playback graphics?


Attachment Size
La_Llorona.mscz 44.73 KB


A quick glance at the code seems to hint that these have been replaced with sposxml and mposxml, although I don't see those options listed in the Export format selector.

In reply to by jeetee

Not entirely sure what this implies, but it indeed doesn't seem like it was only a simple rename of the extensions from .mpos to .mposxml and .spos to .sposxml, because then one would expect that these adjusted commands would work in MuseScore 4:

"C:\Program Files\MuseScore 4\bin\MuseScore4.exe" -o La_Llorona.mposxml La_Llorona.mscz
"C:\Program Files\MuseScore 4\bin\MuseScore4.exe" -o La_Llorona.sposxml La_Llorona.mscz

but that did not work either for me. So there is indeed probably more to it than just a renaming.

For now, I'm still sticking with MuseScore 3.6.2, but I was wondering about the state of this issue today.

I had another look at the GitHub issue you pointed to (and the code changes in the pull request associated with it).
If I get it correctly, this was mainly a change in file name extensions (from "sposXML" back to "spos", and "mposXML" back to "mpos").
Since this didn't make it yet in the latest 4.0.1 release, could you please tell me if this command is supposed to work then (with 4.0.1):

"C:\Program Files\MuseScore 4\bin\MuseScore4.exe" -o La_Llorona.mposXML La_Llorona.mscz

As far as I understand it, If it were merely about an extension name change, then the above command should work with 4.0 and 4.0.1.
But I tried it (now also using "mposXML" with capitals for the XML part), but it doesn't appear to do anything for me.

This still works fine for MuseScore 3, latest stable (with the "mpos" extension in that case):

"C:\Program Files\MuseScore 3\bin\MuseScore3.exe" -o La_Llorona.mpos La_Llorona.mscz

Did anything else change in the way the mpos(XML) file export can be triggered from the command line in 4.x?

I'm just wondering if someone is actually able to obtain these [ms]pos[XML] files in any way, and if so: how?

I suppose there must be a way, as that info is also needed for the synced cursor movement in the playback on the website, so the backend must have some way of extracting that info from the score and store it for use in the web playback.

Well, yes, that is the issue indeed: this functionality is broken compared to MuseScore 3.

Other exports do still work, like this the one for png's:

"C:\Program Files\MuseScore 4\bin\MuseScore4.exe" -o La_Llorona.mposXML La_Llorona.mscz

I created this issue here as advised in response to a forum post in the "Development and Technology Preview" section by another user @Thibaultj , who had observed that this got broken at some point during MuseScore 4 development:
He signaled this, and @Marc Sabatella said that at that time it was still early days with MuseScore 4 development, and that we should keep an eye on it. Which we did, and it turns out it never got fixed before the first 4.x release.

So, how do we go from here now to fix this broken functionality?
Who should we talk to, in order to bring this to the attention of relevant developers for a next release?


Thanks for your suggestion @Jojo-Schmitz .
I had a look at that issue, and tried what was suggested there (switching the order of the -o option & value and the MuseScore file), but that didn't work either. That second comment also mentions a regression with using json files between 4.x and 3.6.2.

Since these technical / development issues appear to be managed in GitHub now, I've created a ticket in GitHub. That way it's easier to put it into a new sprint or GitHub project (and it's also closer to the developers).
So, I'll be following up here now:

Fix version