Setting chord property from plugin based on case : possible ?

• Jun 6, 2024 - 07:11

Hi,
In diatonic accordion scores, chords (CTRL-K) are written in uppercase for root only, and lowercase for "true" chords.
To get proper playback I need to select all uppercase chords (long series of CTRL+click...) and set play root only in properties.
That works but is super time consuming.
Before trying to automate that by a plugin, I'd like to ask if anybody would know whether that's even possible... Do we have access to case of the chord letter by the plugin API for example ?
To be clear I don't want to automate the choice of upper vs lower case, that can only be done manually and I enter the chords directly using the correct case anyway, so there is nothing to automate there. I only want to automate the 'set root only ' in playback properties for uppercase chords.


Comments

For musescore 3.6.2 only,

> from plugin ... 'set root only '

Seems no unfortunately, (the Voicing property in inspector) Pid::HARMONY_VOICING is not exposed. https://github.com/fp22june/MuseScoreTag362/blob/3b5857f0761c42574e8cb5…
https://github.com/fp22june/MuseScoreTag362/blob/3b5857f0761c42574e8cb5…

> select all uppercase chords (long series of CTRL+click...) ... I don't want to automate the choice of upper vs lower case, that can only be done manually

I think you are right plugin cannot automate selection, but I've got an idea of a half-baked plugin that could probably save a few clicks.
How about writing a plugin so that, user can select all chords symbols, run the plugin to set (eg subStyle) property to all uppercase symbols only, use the Rightclick>Select>More>Same subtype to filter, then apply "Root only" Voicing in the inspector.
curScore.selection.elements[0].text displays the (capital and small) characters entered

concept.PNG

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