Porting 3.x plugins to Musescore 4

• Dec 2, 2022 - 21:09

As the final release of Musescore is coming closer every moment I installed a few of my favourite MU3 plugins in MU4 only te see that most of them don't work.
I have some experience in programming in Javascript and C# and have some spare time. So I would like to try to upgrade a few plugins. I found some useful information about creating plugins for 3.x.
Is there already information available about creating plugins for MU4?


In reply to by graffesmusic

Some of my plugins are working nicely under MS4 (e.g. Solo Analyser and Element Analyser, some are only displaying more or less correctly (e.g. Batch Export - now merged into Jojo's version), some are not even showing up in the plugins' list !! (e.g. Scale Workout Builder).

I've personally stopped investigating why for now.

There is a couple of things to look at (or wait for):
* the data and score representations through the API to be updated, stabilized,
* the gui that doesn't look nice (e.g. most texts are getting truncated as "Parenth..." instead of "Parenthood" (in ElementAnalyser)).

For anyone willing to port its plugins to MS4, here are my suggestions:
1. Have your plugin and all its dependencies (if any) in its own subfolder (example),
2. In the top folder, place your README.md file (if any)
3. Consider adding a .gitattributes file in the top folder for preventing all the "non plugin files" to be incorporated in your releases
4. At the level of the code, add the new MS4 properties conditionally (example). title is definitely recommended. thumbnailName and categoryCode are nice to have.
5. If you add a logo, place it in the plugin subfolder.

In reply to by msfp

thank you for sharing! I've written a plugin for MS3 (https://github.com/kspgh/sight-reading-trainer) that now is not working anymore. If I use it, it crashes MS4 without even and exit message... ->please don't understand this as a blame anyone!! :-)

It sounds to me, like it makes sense to wait a while until the new way of creating plugins is available. As you plan to make Musescore Plugin's much more powerful, I guess you will also create/improve many tools and documentation.
Would you confirm this?
BR, Karsten

In reply to by parkingb

Thanks so much for answering.
I think I'll wait until the new concept for Plugin's is ready. Maybe there is much more possible then.
In an ideal case I'd like to write a sight reading trainer plugin, that could use available scores and if a student plays e.g. on a midi keyboard, the plugin could measure which notes were right/wrong, to early or late.
Probably thats too much of complexity for me but lets see. :-)

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