Access Articulations (Arpeggio, Staccato, Marcato, etc) from plugin

• Sep 28, 2016 - 01:49

I have been working on a plugin that generates a guitar part from the chord symbols and predetermined voicings and other user provided data. It is not yet complete, but i have finally got it working without continually crashing..

What I would like to do is to be able to read and create Articulations (particularly those listed in the title) from within the plugin so I can generate an accurate copy of a pattern to bring the playback to life.

I can't find how to access these anywhere in the documentation, is it possible?

Thanks in advance.


Comments

From what I can see at first glance, you can tell whether an element is an articulation or not, but nothing of the Articulation interface has been exposed to the plugin framework.
Also note that an Arpeggio is not an Articulation, but they haven't been exposed either.

To add them, you might get somewhere with the cmd() after making a note selected:
add-staccato
add-tenuto
add-marcato
add-sforzato
But I haven't tested to see how those commands behave.

In reply to by jeetee

Hi jeetee,

Looking at the debugger, the articulations appear to be attached to a chord, I can't find them in the chord Object. Is there somewhere else I should look?

I have tried using the commands to add the marks, it is very slow and if there are a lot of them, the plugin crashes, even using a timer to add 1 bar length every 500 ms. Probably not a viable option.

Have you come across a processevents function, which is apparently a function of the QT eventloop , and is to help stop the gui hanging with long running processes. I'm not sure that is exposed either.

Thanks

Steve

In reply to by stevel05

Once again; I haven't checked yet, but I'm assuming there's a chance you might find them in the annotations of a segment?

The score gets a full layout everytime a cmd changes it, so that might explain the heavy load you're experiencing.

In reply to by jeetee

Thanks for the reply, unfortunately the only thing in the annotations is the harmony objects (chord symbols). I did specifically check there.

Perhaps I should ask for full access in V3. I'm sure this sort of plugin would be advantageous to MuseScore.

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