Change Instrument does not affect playback sound until save/reload

• Dec 30, 2014 - 00:38
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Ubuntu 14.04, GIT commit: 8f17b62

Report in http://musescore.org/en/comment/reply/42736

1) new score for flute
2) enter some notes
3) right click staff
4) staff properties
5) change instrument
6) select Bb trumpet
7) play score

Result: sound is still flute, although staff name, transposition, and Mixer display are all correct. Playback fixes itself on save/reload. Changes to Mixer also work fine.


Comments

Same is true for Change Instrument for instrument change texts. That is, if you add an Instrument Change text, then right click it, and do Change Instrument, it 8appears* to work, but doesn't actually take effect in playback until you save/reload.

This issue occurred on October 11.

- Between this nightly, correct, the last of October 10, I think: fc6fe02

- and this one, on October 11, with bad playback after an instrument change: a7dab0a

So the cause is likely the same commit: https://github.com/musescore/MuseScore/pull/1368/files

For the comment # 1, I don't understand very well that: "Same is true for Change Instrument for instrument change texts. That is, if you add an Instrument Change text, then right click it, and do Change Instrument, it 8appears* to work"

So, I don't know how to reproduce it. Could you please rephrase otherwise, or in more detail, especially "Change instrument for instrument change texts" ?
Thanks.

Thanks for the analysis, that will help a lot.

Here's what I mean about about instrument change text:

1) select a note in any score
2) add "Instrument" text from Text palette
3) right click the text
4) Change Instrument
5) select a different instrument
6) OK
7) play

Result: the instrument sound either does not change at the point where you added the Instrument text, or it changes to something random.

Ok, I had not understood the step 2 :)

So, after checking, I can confirm that the origine is related (I guess it was predictable) with the same commit on october 11, as reported in comment #2.

Specifically, the issue seems to be here:

https://github.com/musescore/MuseScore/pull/1368/files#diff-3056168911c…

If I remove the !seq->isRunning() check, then Change Instrument works. I also added a check to be sure seq is non-null, although presumably if noSeq is false, seq would be valid. Unfortunately, I have no easy way to see if that re-introduces the bug that the commit above was fixing. I'm inclined to think it's probably OK - that the "real" fix was elsewhere in the commit and this check was not needed. But I would not want to assume that!

Yep, confirmed too! (with the last Nigthly: 89dd59b)

All works fine now. Great :)

Just a typo !!!! ;-) These code lines will never cease to amaze me...!