get instrument id for a staff
Currently working on a Sax Fingerings plugin, and I'm stuck at finding out what is the transposition of an instrument. For example, if I loop through parts:
cursor = curScore.newCursor();
cursor.staffIdx = 0; // How do I get information about this staff, like which instrument it belongs to, the transposition, etc.
Of course, with instrument changes, it may change mid-staff, so I get why staves do not hold this information, but is this information accessible from somewhere?
Comments
curScore.parts[idx].instrumentId
?https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…
Likely is only able to provide information on the first instrument of that part though.
In reply to curScore.parts[idx]… by jeetee
and won't work if the parts are anything other than the default generated ones. But yes, it might be worth a try.
In reply to and won't work if the parts… by ecstrema
Not sure I understand your comment.
The provided code has nothing to do with the Parts feature for a user in which (s)he can create excerpts.
curScore.parts refers to the instrument in the current score.
In reply to Not sure I understand your… by jeetee
ohhhh! Good! I really thougths these parts were the excerpts. Thks.