Automatically Remove Unused Instruments

• Jun 6, 2020 - 23:19

MuseScore already has a useful "Remove empty bars at the end of the piece" feature to remove the "horizontal" surplus of bars you may have created before you realized your composition would end up a bit shorter.

It would be helpful to have the same, but "vertically", to remove empty lines/instruments that do not have a single note throughout the piece. Every now and then, it happens that I add some instruments that I think I am going to use, but end up not using at all. Or alternatively, that I revise the piece and gradually remove sections played by a given instrument, until the instrument happens to remain totally inactive throughout the piece.

The respective instrument lines do not need to remain in the final composition. Deleting them manually is somewhat risky, though, because it is easy to overlook the two odd occasions where a cymbal is played during a long play and thus, I may mistake the line to be empty.

Therefore, I'd rather like to trust an automated feature for that.


Comments

In reply to by Jojo-Schmitz

Well, that just temporarily hides the respective staves, they are still there in the file.

Also, it just scans whether a given stave is empty within a given system and hides it in that one system. What I'm looking for is to find out which staves are completely empty throughout the entire score. But unfortunately, that option appears to have no effect in continuous view, even if the "Don't hide empty staves in first system" option is disabled.

If you generated parts for all your instruments, it should be trivial to look at each part to discover the empty instruments. Those'll only contain multimeasure rests by default.

In reply to by jeetee

Clever! But it's still a bit of a pain to then find and delete the corresponding instrument. If it's just once or twice one needs to do this, fine, but I could imagine it coming up pretty often for some people. Maybe not enough to make a dedicated command for it, but enough to make a plugin seem useful.

I can see why one might want this automated - like you said, it could be easy to forget if you used an instrument or not, and hard to scan looking for notes, and error-prone to try to delete manually.

But it somehow also seems like a pretty uncommon situation for most people. If the plugin framework supports what would be needed to implement this such a command, that seems like a good way to go.

In reply to by Marc Sabatella

Having this in a plugin actually sounds like a great idea. This gave me the motivation to look into MuseScore's plugin editor and have a glance at QML for the first time.

Unfortunately, it appears that at least in December 2019, this particular functionality couldn't be made available given the current plugin API:

> An API for adding or removing parts is indeed missing from the current version of plugins API.

https://musescore.org/en/node/294858

Also, the latest changelog for 3.5 alpha doesn't mention anything about this in its Plugins section: https://musescore.org/de/node/303876

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