Make Complete Set of Staff Properties Available to the QML Plugin API

• Sep 29, 2020 - 20:43
Reported version
3.5
Type
Plugins
Frequency
Few
Severity
S5 - Suggestion
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

At present a plugin can only obtain a very limited set of staff properties. This is a significant constraint on certain plugins. The request here is to make all staff properties which are visible in the normal Musescore user interface also available to plugins. Ideally any staff property that is writable in the normal Musescore user interface should also be writable by a plugin, having the same effect as they would if a normal human user modified that property in the user interface.

Use cases include: determining if a particluar staff is a standard staff or a TAB staff. For a standard staff, what the clef is (G-clef, bass-clef, 8Va-cled, etc). If a TAB staff, how many lines does it have? Being able to set the number of lines, open string tuning and number of frets for a TAB staff. Setting the allowed pitch range for a standard or TAB staff.

(Opinion: A robust "Staff" object should be exposed to QML with the requested property set, along with a set of functions for operating on the staff. Operations should include the ability to add a new staff to a specific, already existing, Part. A plugin should be able to iterate over all staves, obtaining their Staff objects, and getting/setting properties as need by the plugin.)

See also:

Issue Make staff properties "change instrument" and "change channel" available in plugin API.

Forum Post Any way to retrieve staff characteristics?

issue: Support Score.appendPart(), Score.insertPart(), Score.clone(), etc. in QML plugins


Comments