Selection dialog box can't select note ties by voice
MS 2.0.2 / Nightly d45cc19 / Win 7 / Win 10.
The select box cannot select note-ties by voice. This issue goes back to, at least, MS 2.0.2. Use the attached file:
Right-click on the note tie in bar 1, voice 2. Select "More …," then "Same voice." Then exit.
Expected result: Only ties in voice 2 should be selected.
Actual result: Ties in both voices 1 and 2 are selected!
Attachment | Size |
---|---|
voice_selection_issue.mscz | 18.37 KB |
Comments
probably by design as ties can connect notes of different voices?
As far as I can tel, we only support voice selection for a few specific element types - basically, notes, rests, and lyrics:
https://github.com/musescore/MuseScore/blob/60cb031bb08029ceddd6badf578…
We could potentially add ties to the list, but indeed, we do support ties between vocies, which could complicate things.
so at least it isn't a bug, it may be a missing feature though
on the other hand the coloring of ties is done as per their voice, so somewhere the voice is known. And apparently the color is determined be looking at the starting note, which IMHO should be enough to make the selection work on this too
Like almost all elements, a tie *does* have a voice, so the coloring is based on that. The only question is whether the voice of the tie is *relevant*. Potentially, there could be three different voices involved: the voice of the first note, the voice of the second note, and the voice of the tie itself. I don't know if there is any guarantee that the tie of the voice is always the same as the that of the first note. Probably makes sense to just use the voice of the tie, though, and if we then discover cases where the tie of the voice does *not* match that of the first note, we could look into if there is a good reason for that.
Well, at least simply adding "|| e->type() == Element::Type::SLUR || e->type() == Element::Type::TIE" to the code you mentioned doesn't do the trick :-(
Apparently at this point in the code, we are looking at a SlurSegment, not a Slur or Tie.
OK, that works indeed. If you don't mind me steeling your idea, see https://github.com/musescore/MuseScore/pull/2274
Fixed in branch master, commit dbcfacc663
fix #85781: allow slur and tie selection by voice
Fixed in branch master, commit 732a142302
Merge pull request #2274 from Jojo-Schmitz/select-slur-tie-by-voice
fix #85781: allow slur and tie selection by voice
Fixed in branch 2.0.3, commit 4c41b54e48
fix #85781: allow slur and tie selection by voice
Automatically closed -- issue fixed for 2 weeks with no activity.