When changing all the notes in one measure to another voice, tied notes don't change voices

• Sep 15, 2015 - 05:31
Type
Functional
Severity
S4 - Minor
Status
closed
Project

To (hopefully) reproduce the problem, fill a measure with notes in voice 1 and tie two of the notes together. Then select the whole measure and change all the notes to voice 2. The two tied notes stay in voice 1 and don't change to voice two.

The bug appears in any voice, any time signature, any key signature, and in scores with any number of parts (at least that I've tested)


Comments

I'm on Windows 7 using Musescore 2.0.2, revision f51dc11. For me, the bug appears when entering notes upon opening a new score as well as when working with an already-existing score. Restarting Musescore doesn't help.

OK, so how do you change a whole measure's notes to voice 2?
If I try, select the measure and use Edit/Voices/Exchange Voice 1 - 2, it works fine
Here too Windows 7, Musescore 2.0.2, revision f51dc11
But also in the latest development version too.

If however I select the notes (list select) or the measure (range select), and then click on the voice 2 in the toolbar, I can indeed reproduce.
And I don't need to select any of the non-tied notes, just selecting any of the tied notes or all of them and then click on the voice 2 button in toolbar shows the problem (by not changing voice)

There is another related problem with slurred notes: the notes move to voice 2, but slur stays in voice 1

Edit: here's the debug output that happens at the time the voice 2 button gets pressed:
Debug: addClone Rest at 480 1/4 (...\MuseScore\libmscore\edit.cpp:241, Ms::ChordRest* Ms::Score::addClone(Ms::ChordRest*, int, const Ms::TDuration&))
Debug: addClone Rest at 960 1/2 (...\MuseScore\libmscore\edit.cpp:241, Ms::ChordRest* Ms::Score::addClone(Ms::ChordRest*, int, const Ms::TDuration&))
Debug: expandVoice: cannot insert element here (...\MuseScore\libmscore\cmd.cpp:355, void Ms::Score::expandVoice(Ms::Segment*, int))

before.png
after.png

This is simply but one of many known limitations with this facility. It handles the easy cases only - notes that are not part of ties or tuplets, being moved to a voice that current has no notes for that span or only notes of matching durations. While someday the particular limitation involving ties might be lifted, it will always be impossible to handle all cases.