How to remove notes
Hello
How can i delete, remove a single note by a plugin in Musescore 2
with:
CURSOR.element.remove(CURSOR.element.notes[0])
Musescore crashes
Can you please help, many thanks
PimPim
Hello
How can i delete, remove a single note by a plugin in Musescore 2
with:
CURSOR.element.remove(CURSOR.element.notes[0])
Musescore crashes
Can you please help, many thanks
PimPim
Do you still have an unanswered question? Please log in first to post your question.
Comments
Click on a note> Delete? Don't work?
if I did not understand provide more details, see:
https://musescore.org/en/node/73741
In reply to Click on a note> Delete? by Shoichi
thanks i understand, but i want do to that by a musescore 2 plugin
In reply to thanks i understand, but i by PimPim
Those available are here: https://musescore.org/plugins
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" object...in 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;
chord.remove(notesToDelete[n]);
}
In reply to I was browsing some of the by rob@birdwellmu…
Anyone have any examples of removing notes from the selected region using MuseScore 3.x ? The above code excerpt/concept works great for MuseScore 2.x but not for MuseScore 3.x as far as I can tell so far. I'm trying to port my PruneStack.qml script to 3.x: https://raw.githubusercontent.com/birdwellmusic/PruneStack/master/prune…