plugins and accidentals

• Aug 11, 2012 - 21:34

I'd like to have a way to automatically add cautionary accidentals and I tried to figure out how a plugin could do this, however, plugins seem to not be able to

  • know if a note actually has a (necessary) accidental
  • add a cautionary accidental (userAccidental) to a note

I'm new to MuseScores' plugin framework, so the question is: do I miss something?


Comments

I don't think so, at least not for 1.2. This was actually one of the very first things I tried doing a plugin for, and I hit the same road blocks. Would love to hear that the new 2.0 QML framework improves on this, but I just haven't had the time to check it out.

In reply to by Jojo-Schmitz

The problem is to know if there's a written accidental in front of the note, because this depends on the current key signature: A C# for example would not have a written accidental in A major.
There is however no way for the plugin to know the current key signature.

In reply to by Jojo-Schmitz

keysig, however, is a global parameter. There is no way to ascertain the *current* key signature in music containing key signature changes or transposing instruments.

And while the userAccidental note property appears to work for *reading*, it does not appear to work for *writing*. At least, it did not as of 1.0 when I tried it last.

In reply to by Marc Sabatella

I just found a new problem:
There seems to be no way for a plugin to know on which staff a note actually is written. Eg. a note of a piano right hand staff could be moved to the left hand staff with CTRL-SHIFT-DOWN.

Is there already a place where this kind of feature requests for the plugin system are collected? Or might I just open a new feature request?

EDIT: Maybe this is not really necessary, since the Score.parts list could be used to find the number of staves an instrument has, and/or to build a table indicating to which instrument a staff belongs. This would avoid the above problem, for the plugin could work simultaneously on all staves of the same instrument.

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