Need Plugin Example - How to Delete Note(s) from a Chord in MuseScore 3.x

• Jul 4, 2019 - 21:10

Can anyone provide a snippet in QML for how to delete one or more notes from a chord? (from the current selection.) I was able to do this with my PruneStack plugin for 2.x but the code that conditionally "deletes" (or prunes) selective notes from an array of chord stacks no longer works in 3.x. (All of the other functionality does, so I'm just blocked on the specific way to "delete" notes from chords in 3.x.)

I'm assuming this is due some changes to the API.

Here's my PruneStack plugin in github - again, this code works in MuseScore 2.x and I would love to get it working for 3.x at some point! For me, this plugin is useful in those cases where "exploding" a stack of notes isn't always possible or ideal and when one simply wants to "prune" out one or more levels of notes from a blocked voice melodic line.
https://github.com/birdwellmusic/PruneStack
prunestack-3x.png

Thanks for any help/tips MuseScore community/developers!


Comments

In reply to by DLLarson

On line 176 of the 2.x QML version (see below), the chord's "remove" method was available
...e.g., chord.remove(...)

  • however, "chord.remove" is not (currently) available in 3.x. As mentioned previously in this thread it either needs to be added into the API or (if it has changed) needs to be called another way:

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

See TODO: comments - chord.remove(...) doesn't seem to be exposed yet for 3.x.
https://github.com/birdwellmusic/PruneStack/blob/master/prunestack-3x.q…

I have submitted an issue tracker for this:
https://musescore.org/en/node/291790

In reply to by rob@birdwellmu…

Ok... Thanks.

Looking at the 3.0 internal Chord::remove() implementation, it looks nearly the same as the 2.0 version so that's good. I'll dig deeper on it. It should be EZ unless I run into a gap in the undo system.

>I will submit an issue track for this (unless of course there's another way to achieve this in 3.x) - thanks!

Please do! That will allow tracking the GIT pull request against the issue.

-Dale

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