Note octave number in a plugin?
Within a plugin, I can get a note's pitch (e.g. tpc, tpc1, tpc2) but how do you get the octave number, if that is the term (e.g. C3, C4, C5, etc)? The pitch is on the element as in cursor.element.tpc.
Thanks
Jerry
Within a plugin, I can get a note's pitch (e.g. tpc, tpc1, tpc2) but how do you get the octave number, if that is the term (e.g. C3, C4, C5, etc)? The pitch is on the element as in cursor.element.tpc.
Thanks
Jerry
Do you still have an unanswered question? Please log in first to post your question.
Comments
sorry, found how to calculate it using "notes.pitch" in a plugin.
Thanks anyway.
Jerry
In reply to sorry, found how to… by dadorehancock
Could you share how you did this? It would really help me out
In reply to Could you share how you did… by mikespar18
Have a look at this plugin code around line 365 and later where it calculates octave.
function nameNote(note)
https://github.com/mirabilos/mscore-plugins/blob/master/notenames-as-st…