Measure and segments position export in Musescore 4.x

• Jan 6, 2021 - 13:42

Hi Musescore lovers,

Here is a question about a feature that I fear will be removed from Musescore 4.x.

In musescore 3.x, there is a command-line parameter that allows exporting the positions of different elements from a score into custom data files.

See on the command line manual here : https://musescore.org/en/handbook/command-line-options (search for mpos and spos)

Related code is here : https://github.com/musescore/MuseScore/blob/3.x/mscore/file.cpp#L1981-L…

I've been checking the current master branch holding the code from the future Musescore 4 release. It looks like it was heavily rewritten and reorganized (and it's really much cleaner now), but alas! the aformentioned feature seems to have been removed.

See here for the relevant code : https://github.com/musescore/MuseScore/blob/master/src/importexport/imp…

So my questions are: was this feature removed on purpose? will it be part of the musescore 4 release or is it gone forever?

Thank you for reading.


Comments

I would also like to hear the answer to these questions, and truly hope that this is not actually removed in 4.x but will eventually be re-implemented (or copied over from MS2 and MS3 if possible, whatever works best) later on.

Some time ago, there was an actual web API using OAuth we could use to get public and even the logged-in user's own score images, corresponding measure positions and a sound file to play back. Then this web API was discontinued...

If this command line functionality is now removed as well, then there is no way any longer to get measure (and segment) position info that can be linked to the generated images or sound file for our scores (I saw that the images and sound files can still be generated, so that's good).
Unless there is something I'm missing here?

Note: a recent thread about this, where apart from myself also 2 other people were using this, is here: https://musescore.org/en/node/307253 (this was specifically about a bug introduced in MS3 for the spos files; the .mpos files should still be fine). With Thibault now as well, I already count (at least) 4 users of this functionality.

Thanks for considering Thibault's important questions.

Maybe another, related question: how are the images and position maps created for the MuseScore website? Isn't that using this same command line functionality?

In reply to by KoenTanghe

You might think so regarding musescore.com, suggesting support may well be added back at some point before that website needs to support MuseScore 4 scores. Good to have a heads on up on this, and definitely keep your eye on it, but be aware, MuseScore 4 is a very very long ways from being stable or usable, tons of things are being redesigned and reimplemented, so it's to be expected a lot of things won't work at any given time until we get a lot closer to any sort of release. if the feature isn't back by the time an alpha release happens, then definitely raise the issue again. And no, I don't know when that might be, but I can't imagine it being before the summer.

In reply to by Marc Sabatella

Thank you for the feedback Marc.
I think we are aware that MuseScore 4 is still a long way to go. It was just a bit scary to see the other "export formats" still being there but not the .mpos / .spos formats. I think that was also Thibault's concern: was this deliberate or not. Good to hear this will most probably come back at some point before the alpha, and we'll keep an eye on this and raise this again if it's still missing then. Thanks again for the clarification!

In reply to by Marc Sabatella

Hi again Marc,

I just noticed that MuseScore 4 has been released (congratulations, this looks like a big major update!) and I thought I'd try and see if the export of measure and segments positions finally made it into MuseScore 4.

It turns out it didn't...
Or at least not in the way it was with the following command line options:
(test score: https://musescore.com/user/29343852/scores/6546801 )

Still works in MuseScore 3.6.2 (last v3 version I have here):
"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
--> you get the expected La_Llorona.mpos and La_Llorona.spos files

Doesn't work in MuseScore 4.0 (just installed):
"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
--> you don't get any output at all...

The original code for this functionality (in branch 3.6.2) was here:
https://github.com/musescore/MuseScore/blob/3.6.2/mscore/musescore.cpp#…
which then called into this code:
https://github.com/musescore/MuseScore/blob/3.6.2/mscore/savePositions…

Given that there was a big overhaul of the codebase, did this functionality perhaps transform into something else (I assume this kind of info is also needed for the web site playback graphics), or can it be obtained in another way?

Thanks,
Koen

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