Programmatically detect parentheses around notehead
Hello!
I've been playing around with plugins and I'm trying to make a plugin that detects when notes have parentheses around them so I can automatically decrease the velocity and simulate a ghost-note. Is there anyway to use the plugin API to detect parentheses or even just find where all the open-parentheses-symbols are in a score? I'm having trouble finding anything that suggests doing so in the documentation.
Thanks
Comments
Right-click->Select all Similar Elements. Then use Inspector could that help?
In reply to Right-click->Select all… by Shoichi
programmatically, in a plugin...
Accidentals have a property 'hasBracket', not sure about notheads
In reply to programatically, in a plugin… by Jojo-Schmitz
Yeah... as in I'm programming a plugin.
Yeah I can't find a property for "hasParentheses" Problem is, accidental brackets are an actual element property whereas I'm pretty sure parentheses are just treated as extra lines attached (somehow) to the note elements.
In reply to programatically, in a plugin… by Jojo-Schmitz
I'm also not entirely sure of the power of the Cursor. Is it possible for it to detect these Parentheses symbols and perform some action on the next element after it detects one?
In reply to Right-click->Select all… by Shoichi
So that does select all the parentheses, but there's no way to select the notes within them. Also, it seems parentheses are just called "Symbol" in Musescore, which is somewhat disheartening... I don't think there's a Symbol namespace in the documents.