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.


Comments

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.

Standardizing repetitive functions such as cursor handling and selection checking not only saves time, but also ensures consistency between plugins. I agree that a high-level library could help reduce the risk that changes to the QML/MuseScore core would affect individual plugins. However, for https://www.thefrontendcompany.com/posts/ui-modernization ui ux modernization I think we should hire separate specialists. Working together on such a resource would make it easier to maintain and port plugins in the future. If you can get around the problems with including other files in QML scripts, it would certainly improve the developer experience.

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