Plugin needs ability to remove/delete note from a chord

• May 25, 2019 - 22:13
Reported version
3.0
Type
Plugins
Frequency
Many
Severity
S4 - Minor
Reproducibility
Always
Status
duplicate
Regression
Yes
Workaround
No
Project

In MuseScore 2.x my "PruneStack" plugin was able to remove notes from a selected region of each chord but this code doesn't seem to work in 3x anymore:

for ( var n = 0; n < notesToDelete.length; n++) {
var chord = notesToDelete[n].parent;
chord.remove(notesToDelete[n]); // TODO: broken in 3x
pruned = true;
}

Works in MuseScore 2.x
https://github.com/birdwellmusic/PruneStack/blob/master/prunestack-2x.q…

Note quite working in MuseScore 3.x
https://github.com/birdwellmusic/PruneStack/blob/master/prunestack-3x.q…

Most of the UI and some other functionality seem to be working though...the following line (among others) is also throwing exceptions in the debug window, probably because the item no longer exists (or hasn't been ported or is different) in 3.x:

endTick = curScore.lastSegment.tick + 1; // TODO: broken in 3x

I realize there may be other parts of the 3x qml script that may be breaking due to the upgrades to the plugin engine which may still be a WIP. But if anyone can shed light on how this PruneStack qml script can be migrated to work in MuseScore 3.x that'd be great!


Comments

Fix version
3.3.0