How to remove notes

• Sep 28, 2015 - 14:08

How can i delete, remove a single note by a plugin in Musescore 2

Musescore crashes

Can you please help, many thanks


I was browsing some of the posts on plugins as I recently created one to delete notes actually....

I was getting crashes too in my attempts to delete notes from a QML script...

The trick seems to be to keep in mind that any given note has a parent Chord. So you have to call the remove method from the "chord" this sample, I've got an array of notes...get the chord from the note's parent and call the remove from the chord object...that seems to keep the memory/object heap happy:

for ( var n = 0; n < notesToDelete.length; n++) {
var chord = notesToDelete[n].parent;

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