Plugin API: How to set tpc / pitch of note
Hi all. I am planning to release a plugin which recreates the up arrow / down arrow functions for microtonal tunings. However, I am stuck as setting a note's pitch / tpc property doesn't seem to do anything to it:
n.pitch = 60; n.tpc = 14; n.accidentalType = Accidental.SHARP_ARROW_UP; n.tuning = 133;
I tried the above code as a proof of concept to see if this method would work, but it doesn't.
I've taken a look at the implementation for the plugin system in mscore/plugins/api/elements.cpp and I've come across the setTpc function, however when i to use it in QML, it gives an error saying there is no such property.
Is there any way for me to change just the pitch of an existing note using the plugin API without having to delete it and reconstruct it?
P.S. I am aware of the
cmd function which allows me to invoke user controls, however it doesn't allow for an easy way to set a note's exact tonal pitch class as it prefers sharps when going upwards, and flats when going downwards, and notes in the key signature takes precedence over enharmonic equivalent notes that are not.
Any help would be appreciated! Thanks in advance.