Improvement Needed: Filter Function

• Nov 8, 2019 - 21:22

Good afternoon, MuseScorers!

As I've been digging into a large-scale project for the Main Office, I've come to find I could use a much stronger filtering tool - so I'm hoping you all might be able to come to the rescue!

The "tl;dr" version of this post:
Any object that has a unique property that can be altered should be easily isolated in with the filter.

Here's an example:
If I've imported an XML file, there will be things to edit: for example, hairpins (that is, crescendos/diminuendos) don't format correctly. So I have to delete all the existing data and re-enter new hairpins.
My process means selecting every hairpin, one at a time (Ctrl-Clicking up and down the score) to highlight all of the hairpins, then deleting them.
I would love if I could highlight a measure from top to bottom, then turn to the filter to quickly isolated the hairpins.

In the existing Selection Filter, if I isolate ONLY dynamics & hairpins - it doesn't select anything at all!

Another example: let's say I copy material from one instrument with one transposition to another instrument with another transposition. The copy/paste function copies the beam direction of all the 8th/16th/etc. notes. I want to do a Select All, filter to select ONLY the beams of the whole score, then reset the beam properties to place them at automatic positions.

Other engraving programs have filters that allow the user to isolate notes by pitch, by rhythmic value, by defined articulation. They also allow the user to isolate slurs (the lines themselves), ties, trills, and so on.

Eliminating the palette function and turning it into a very very powerful right-click menu (doubled in the Edit drop down) would be the best way - rather than trying to cram this powerful of a tool into the limited scope of the side palettes.

The next step, once the filter is fixed, is to allow the user to define keyboard shortcuts that can execute any of the filter functions with a keystroke.
An example - in one of the competing applications, I often find a need to filter dynamics en masse. I have it set up such that Shift+Opt+D will select all Dynamics in the selected range.

Have at it, friends! Let me know your questions!

-- Ryan


Comments

First question: what is the specific problem with the formatting of the imported hairpins> Might be a more direct solution to the underlying problem.

Second question: isn't what you describe regarding selecting hairipns basically the same as right-click, Select / All Similar Elements in range Selection?

Third (not a question): the MusicXML import normally forces stem directions to be as recorded in the file rather than setting them to Auto as you would, I think prefer. So you don't really need any fancy selection - just Ctrl+A to select all, then Ctrl+R to reset everything. Or get fancy and only reset the stems & beams by first selecting them as suggested above. But no need to make things anywhere near as difficult as messing with the Selection Filter.

Most of the remaining filters you mention - select by pitch, etc - are in right-click, Select / More.

In reply to by Marc Sabatella

Marc,
The selection tool is quite useful - thanks for that tip. This is a case of this tool not being where a user might expect to find it, intuitively - especially when there is already the "Selection Filter" tool in the Palettes.
The two tools should be considered side-by-side in order to better define their names, their functions, and their placements.

The specific issue with the hairpins:
1) they always end one note head sooner than the original source. If the original had a hairpin that spanned 4 quarter notes, Musescore will end the hairpin at the 3rd quarter note. If it was a hairpin extending for the duration of a whole note, the hairpin will appear at the smallest possible width that Musescore will allow:
Screen Shot 2019-11-09 at 4.31.52 PM.png

2) if a "swell" is indicated in the original score:
Screen Shot 2019-11-08 at 4.24.57 PM.png
Musescore's import will appear as:
Screen Shot 2019-11-08 at 4.24.41 PM.png
One solution is to grab handles and drag side to side, hoping for the best. Another solution is to add rests in an additional voice layer, attach the hairpins to the rests, then make the rests Invisible:
Screen Shot 2019-11-09 at 11.54.21 AM.png
While it gives the correct final graphical appearance, the hairpins are not attached to the material to which they apply, and it's a cumbersome and laborious process.

To your third point - much of the data is imported to "Auto" placement settings.
Where I've come across incorrectly forced stems or beams is - as one example:
Copying a Bass Clef tenor brass part (e.g. Euphonium) - then pasting it to its Treble Clef transposition. The stems and beams will appear in the Bass Clef part as "Auto" placement. The Treble Clef part will show them as forced to Up or Down, to match the Bass Clef layout.

Thanks for the reply! Very helpful!

In reply to by Ryan

Can you attach a MusicXML where you believe there is a problem with the hairpin length? As far as I know we interpret the standard correctly there, so it could be the program that exported the file is doing it wrong, but maybe there are cases where we get it wrong. Seeing an actual sample would help. The swell would be a case where indeed we don't have a good way of handling it, but other cases should be OK AFAIK.

Regarding the filter, it's really something different, it's for removing stuff remove a selection, not for creating the selection to begin with, which it what the Select menu is about. But I could imagine exposing the Select menu better, it's one of the few things that currently still requires a right-click. I don't think there's a meaningful way to attach a keyboard shortcut, though, because it would need to know which element you are referring to, and there's no way to do that without losing the range selection.

Regarding the stems & beams - as I said, all stems and beams are normally hardcoded in the MusicXML, so we honor them in an effort to be as true to the original as possible, But in most cases, if you plan to edit the results, it would be better to just reset them all to Auto. That's why I suggested Ctrl+A/Ctrl+R. It's always the first thing I do after an import. Then I can edit, including transposition, and stems & beams respond as they should.

In reply to by Marc Sabatella

In the case of the XML, I can't attach it. The file is one of many (several hundred) we are working on for a special project and is another writer's property - if that makes sense.
So - I tried an experiment and opened all three of the "big boys:" Dorico, Sibelius, and Finale.
I input the same material into each program, then exported to XML and imported into Musescore.
Dorico input:
This is how you can insert hairpins, using a cursor and hash marks to be precise - no drag and drop:
Dorico dynamic entry.png
Final product:
Dorico original.png
And this document imported into Musescore:
Dorico XML Import.png
This is the most accurate (but still erroneous)

Finale:
original:
Finale original.png
Import:
Finale XML Import.png

Sibelius:
Original:
Sibelius original.png
Import:
Sibelius XML Import.png

This last one is the exact situation I get every time in Musescore. So, I now know that the source of our files is using Sibelius to write their scores.

The XMLs from each program are attached here as well, if you want to explore further.

In reply to by Ryan

Another, unrelated notable situation:
The bottom staff, with unused space - in the Dorico and Finale imports, these measures are correctly filled with bar rests (a completely empty measure). The Sibelius import insets a whole rest, rather than a bar rest. This would create confusion in other areas, such as generating multi-measure rests in parts.

In reply to by Ryan

It's not really clear if you still think we are doing something in error, but if so, I encourage you to start a new thread devoted to this topic only with a single XML file that clearly demonstrates the problem. Then we can investigate whether the file itself is the issue or whether our import is. Maybe you can get a stripped-down example from the person who provided you the original file.

In reply to by Ryan

Not surprising if they all came from the same program and that program's output is incorrect. As I said, we really need a single clear example that you think is in error in order to begin investigating, ideally, in a new thread devoted to this problem. Too many different things going on here to keep it all straight or be sure which file is intended to demonstrate what.

But I just tested a hairpin exported from MuseScore and then imported again, and it worked perfectly:

hairpin.png

So this shows we are capable of producing this result given a particular input. Whether the program that produced your files is in error or not we simply cannot say without one clear simple example like this.

Based on my best interpretation of the various different things described so far, my tentative conclusion is the Sibelius MusicXML export is simply wrong. Was that using the Dolet plugin or not?

In reply to by Ryan

Open the plugin creator: Ctrl+P, copy paste this code into it, save in your plugins folder (or use the provided file). Open your plugin manager and set a shortcut for the plugin.
import QtQuick 2.0
import MuseScore 3.0

MuseScore {
menuPath: "Plugins.TheSims"
description: "Select all similar elements"
version: "1.0"
onRun: {
cmd("select-similar")
Qt.quit()
}
}

Attachment Size
select_similar.qml 250 bytes

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