How to get all objects in the score, including the TItle/Subtitle text box?
Hi there
When I select the whole score, then do curScore.selection.elements, I get all the elements that are attached to a bar/staff — but I don't get the Title/Subtitle text frame at the top of page 1. I'm unclear how I get a reference to that — what object is it attached to?
Comments
Title is found in curScore.scoreName. Subtitle etc. I don't know...
In reply to Title is found in curScore… by elsewhere
Thanks — that gives me the string, but I was hoping to actually get a reference to the Element itself.
In reply to Thanks — that gives me the… by michaelnorris
The API is far from 'complete'
https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…
See also: https://musescore.org/en/node/337263
Edit: and https://musescore.org/en/node/329479
In reply to The API is far from … by elsewhere
Thanks — I figured that might be the case. It would have been great if you could just ask for curScore.elements to get a list of every object in the score...
In reply to Thanks — that gives me the… by michaelnorris
Seems you can get the the text of Title etc but only if you select them manually, and they only select one at a time. When you ‘select all’ you select the score and that also does not include title etc.
var elems = curScore.selection.elements;
for (var i in elems)
console.log(elems[i].text);