A plugin cannot create Roman Numerals or Nashville numbers, only Chord symbols.

• Aug 18, 2020 - 16:42
Reported version
3.5
Type
Plugins
Frequency
Once
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

The plugin-API allows for creating HARMONies:
harmony = newElement(Element.HARMONY);
This creates a "Chord Symbol" but not a Roman Numeral symbol or a Nashville Number symbol - you get an ordinary "Chord Symbol". The API does not expose any way to set its subtype (to RNA or NN).

Existing RNA- elements CAN be altered (change its text) and deleted - BUT not created.

It would be useful if Roman numerals and Nashville numbers had all the functionality (applicable) as Chord Symbols, including creating them from a plugin (and possibly other use cases?).


Comments

Frequency Many Once
Severity S4 - Minor S5 - Suggestion

You're all but one...
And this hasn't been implemented, so isn't a bug but a feature request, AKA Suggestion

Doesn't harmony.subStyle = Tid.HARMONY_ROMAN or harmony.subStyle = Tid.HARMONY_NASHVILLE after creating an element already do what is intended here?

:) That's exactly what I am doing (setting the subStyle) - but it seems like subStyle is a property of the HARMONY element's text and not the sub-TYPE of the HARMONY itself (subStyle and subType are different things and I haven't found a way in the API to set the subType, only view it).

I am getting Chord Symbols with text that is parsed as RN but correctly presented as such only if you double click the text.
If you right click a true RN in a score (added by hand) - you will see that MS recognizes this almost like an ELEMENT type of itself; "Roman numeral".
HARMONYs a plugin creates with subStyle HARMONY_ROMAN are unfortunately still recognized as Chord symbols - not Roman Numerals.

I haven't really tried Nashvilles that much. From the little I have done they behave like Roman numerals.

Status active needs info

A code sample:
var harmony = newElement(Element.HARMONY);
harmony.subStyle = Tid.HARMONY_ROMAN;
harmony.placement = 1;
harmony.text = "bvii(43)"
cursor.add(harmony);

Ah, it looks like chord symbol type is controlled by a separate property with id Pid::HARMONY_TYPE which indeed isn't exposed to plugins. Then exposing it would indeed be good to do.

Fix version
3.6.0