Plugins for 3.0
This is a guide for the MuseScore 3.0 plugin implementation.
Converting a plugin from MuseScore 2.0 to MuseScore 3.0 has the following changes:
import MuseScore 1.0 becomes
import MuseScore 3.0
cursor.element and cursor.segment are now cursor.element() and cursor.segment() (ie, functions rather than properties)
Most musescore specific properties can be accessed by get and set, ie, note.get("color") and note.set("color","red")
Element types are now in the Ms namespace, so it is now Ms.NOTE, not Element.NOTE
You can find out the properties an element supports with readProperties and writeProperties, which return an array of property names supported by that element.
readProperties returns readable properties,
writeProperties returns writeable properties. These are usually the same, but not always.
List of properties accessible through get and set.
|pitch||int||MIDI pitch of this note|
|tpc||int||Tonal pitch class, as per concert pitch setting|
|tpc1||int||Tonal pitch class, non-transposed|
|tpc2||int||Tonal pitch class, transposed|
|small||bool||Small notehead, chord or rest|
|mirror_head||bool||Mirror notehead on x-axis|
|color||color||Color of element|
|track||int||Track the elment belongs to|
|selected||bool||Element is selected|
|generated||bool||True, if the element has been generated by layout|
|user_off||point||Offset from normal layout position|
|placement||int||Placement in staff: Ms.ABOVE, Ms.BELOW|
This is a work in progress.