HowTo for QML Plug-ins

• Dec 28, 2015 - 18:30

Hi,

I can find lots of posts observing that JavaScript is gone in MuseScore 2.x, various posts that the JavaScripts are not found by 2.x, and various documents vaguely about QML, some dating back several years, but so far no obvious guide to using QML on MuseScore and no guide to converting JavaScript plug-ins to QML plug-ins.

If someone knows how to do these things, could they please post at least a starting point here and get it pinned.

Perhaps we could also have nice clear links somewhere to the plug-in repositories, as they're not easy to find.

Gordon.


Comments

In reply to by Marc Sabatella

What I had mind to do was to port the XML2ImproVisor plug-in, and my batch-oriented adaption of the same, from MuseScore 1.3 to MuseScore 2.x.

To do that I need to understand how to get from an 1100 line 25k program of which I have a modest understanding, that was written in one language with which I have only a passing knowledge into a probably similar-sized program in another language of which I presently have no knowledge.

I doubt I'm the only person considering a task like that.

I doubt I'm the only person wondering if it's worth all the hassle.

Maybe I'll just go back to 1.3 where it worked.

Maybe someone could put JS support into 2.x for compatibility or transition.

In reply to by GordonS

That's awfully big for a plugin, you probably are one of the few considering a project of such magnitude. From what I know, that plugin would probably work as well or better as a standalone script (perhaps in Perl) than a plugin anyhow.

But FWIW, language-wise, it's still essentially Javascript, so shouldn't be that bad. It's more the object model that has been updated. And reading the old interface would be a monumental task, and the difficulty of supporting it was one reason it was replaced. I wouldn't count on it coming back.

In reply to by Marc Sabatella

Hi Marc,

Making it a standalone was something I considered some time back and am again considering. Last time I looked at this plug-in, I just made a batch-converting version, but that was a fairly modest little hack.

I suspect the only real reason it's a MuseScore plug-in is that MuseScore parses the XML files for it, then the plug-in uses the MuseScore data.

Whilst writing this, I think I've just made the decision. I'll look to make this a separate application. On of my views the first time I looked at is was "why the heck is this a MS plug-in?". I'll probably use Python, with which I do have some familiarity and which seems popular for music stuff. Perl is amazing, but rather indigestible. IMHO.

The main reason for my post was .. "Can we get some js->qml guidelines pinned in the forum?". The confusion and questions about .js plug-ins seems to me a common issue.

In reply to by GordonS

Agreed on all counts. And actually, I think I meant Python when I wrote Perl :-)

BTW, I have long thought we should consider a tighter integration between MuseScore and Impro-Visor (or similar tool) to provide automated playback of rhythm section parts directly within MuseScore. I'm not really sure what that would like, but the ability to "play" chord symbols is a common request here, and I don't know that MuseScore needs to reinvent that particular wheel.

In reply to by Marc Sabatella

There are a couple of candidate methods by which that might be done. Impro-Visor is definitely one of those, MMA seems to me an alternative. They have slightly different aims, but both have some kind of accompaniment. At first look, MMA appears to be batch generation only, but there's a program "LinuxBand", which demonstrates that that isn't entirely true. The -P option of MMA means "play the midi immediately" and I think LinuxBand hooks the MIDI to keep in sync. MMA and LinuxBand are also written in Python. Impro-Visor is written in Java.

There's a third class of tool in this general accompaniment group; the arranger, as used in some keyboards, in add-on boxes like the Roland BK-7m and programs like vArranger.

This is all off-topic for this thread, though.
Should we start or move to a thread on the subject?

In reply to by GordonS

Hi GordonS,

Did you start development of a python tool to convert MusicXML to Improvisor or MMA? It looks like the improvisor plugin is big because it does the XML parsing in Javascript. I believe it would be a lot more flexible to write this part in Python and put it on a server somewhere. Then make a plugin to access this webservice. I did that in the past for the ABC import plugin and a couple more.

In reply to by [DELETED] 5

Hi Lasconic,

I did, but I stalled due to a subtle but rather nasty fileserver failure. It seemed to be corrupting discs, but even after a new disc, it still corrupted, installs failed, updates failed; as real pain. I suspect a failed electrolytic somewhere where I couldn't reach. It's now a new machine and is looking fine at last.

I've started a Python spin-off, but have yet to make that much progress. I wasn't sure whether the XML parsing was done in the plugin or by MuseScore. I decided to not care and just get on with it.

Hopefully I'll get under weigh again shortly. I have a couple of projects starting in OpenSource (ffado, too), but I'm also in the throes of quitting my job, so I'm doing the handover stuff. I should be out of that mid February. I'm old enough that this is now semi-retirement.

There are some music-xml parsing packages around. I just(!) have to learn them and the rest :-).

ARB,
Gordon.

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