Delete all invisible elements?

• Feb 16, 2018 - 05:43

I want to delete all invisible elements, like notes, rests, articulations, texts, etc. Is there any way to do so?
Thanks


Comments

Invisible elements (after applying the invisibility via V shortcut or in Inspector) can be completely hidden in View -> Untick "Show invisible"
You can delete notes, rests (except rests in voice1), articulations, etc, by selecting all similar elements.
But what exactly your goal? (not really clear here)
Can you provide more information on what you attempt to do.

In reply to by KeldeoJustified

I am not aware of current plans, but feel free to file an official feature request via the issue tracker.

Perhaps better, though, would be to understand the use case here and solve it more directly. Eg, why are there invisible elements in your score that you don't want exported, and is there maybe a better way to achieve this? Like, maybe there is a better way to accomplish whatever you are trying to do via invisible elements. Or perhaps MusicXML export could simply be changed to exclude invisible elements automatically.

In reply to by Shoichi

(@Shoichi) Hahaha, nice, I sort of hoped to see that box already as it's now 2022, but nope! A later reply asks why anyone would want to select all invisible elements, well I just found another reason. When I'm creating a score which is complicated by large numbers of tied notes with just the odd note in a chord being played and the rest held, it can be incredibly difficult to read the music when playing it, so I grey the held notes and just have the ones that need to be struck again in the normal black. Indeed the facility to do this is exactly why I dumped Sibelius, my version can't do that and it's incredibly expensive to buy the latest version (and I'm not even sure it can do it still anyway). Anyway, on my latest score I forgot about colouring the notes grey and made the mistake of setting them as invisible instead. Then I printed it out and realised that all my invisible noteheads were missing. AAAARGH! As there's no "select all invisible" option, I've now got to select each invisible notehead again and change it to grey and make it visible again - I could have done that in seconds with a select-invisible option, but now it's going to take me about 20 minutes. I certainly learnt my lesson, hehehehe, but it would be a handy option anyway.

In reply to by sammik

@sammik Many thanks for that! I haven't tried looking at plugins in Musescore yet so I opened your QML file in Notepad++ and it seems this plugin would completely remove all the invisible elements rather than just selecting them. The job I had to do was to make all the elements visible and then, while they were still selected, change their colour to grey. Although I'm not familiar at all with that programming language, I would wildly guess that a plugin for selecting all invisible elements could use your existing plugin code but instead of the "removeElement(el)" line, it would need to store the number of each invisible element in an array. Having been round the loop to collect all the element numbers of the invisible elements, it would need to de-select all elements, and then run another loop to select all the element numbers from the stored array, and then exit the plugin leaving those selected elements still selected for the user to carry out whatever operation is desired on that selection. I've done the job manually now, but I suggest this in case anyone fancies tweaking the plugin to act as a "select all invisible elements" function :o)

In reply to by sammik

@sammik That's superb, thank you! I'm particularly pleased to see that my novice suggestion actually turned out to be a feasible way to code it, heheheheh! I couldn't have worked out the syntax for that code, I did try looking some things up in the plugin help guide but it would be a long time before I know enough about the way data structures work in that language to have done that so elegantly. And it works! I've tweaked the text strings in the file here so it says that it's for selecting limited elements and has the right internal plugin name. When I ran it, I noticed that it had successfully selected all the noteheads that I'd set invisible for the test-run, BUT the Inspector wasn't showing any selected items even though they were all highlighted in the score - I don't know if there's a way to code the plugin so that the Inspector realises there are elements selected, but it wasn't a problem because all I had to do was shift-click on any other element to select it and then shift-click on it again to de-select it, and that kept all the existing selections active while also waking up the Inspector so I could change settings on all the plugin-selected elements together. Sorted :o) Brilliant, cheers!

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