Update note pitch value

• Apr 30, 2020 - 16:20

I am working on a plugin that updates note pitch values. However, some notes reflect the updated values on the score, and others do not.
var refPitch = cursor.element.notes[0].pitch;

while (cursor.segment != null && cursor.tick <= endTick) {
if (cursor.element.type == Element.CHORD) {
cursor.element.notes[0].pitch = refPitch;

When the script ends, the pitch values for the notes are correct, but the displayed score doesn't reflect the changes. Is there a function to redraw the score?


I have that same question. Coloring the notes in a score by a dialog plugin often does not change anything visually unless you scroll the score the tiniest bit. So I guess, bmiller793's code changes the pitches but the score on the page doesn't. Probably until the score is scrolled.

Do you still have an unanswered question? Please log in first to post your question.