MuseScore community plugin developer's library anyone?

• Sep 22, 2019 - 16:15

I'm back to scrambling around in the pitch black night that is plugin development in MuseScore. One persistent annoyance is the re-inventing of wheels all the time. I'm specifically thinking of the code that gets a cursor, figures out if there is a current selection or not then iterates over the cursor in different ways depending on that condition. Everyone seems to have their own version or even versions of that, but I'm sure there are other examples.

I'm suggesting we plugin developers might collaborate on a shared library of common utilities, rather than have to search one another's code. I'm aware that the plugin creator has issues with Qml scripts including other files (the plugins themselves work fine) but assuming that could be fixed if it hasn't been already, then a high-level library would have the additional benefit of protecting developers and their plugins from changes in the Qml/MuseScore substrate, making future porting easier.

I'd envision we would just need to sub-class the MuseScore class in Qml, and add to that, but I haven't tried it yet.


I strongly recommend my red note and articulation plugins (see "articulation" in the plugins page) as clear examples of both these things. There are now two kinds of selections, ranges and collections of objects, and they (variably) handle both.

The Qt 5.9/5.12 issue is going to require painstaking documentation. I volunteer to contribute.

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