ExportMidi::writeHeader() only write default C sig if no initial key sig found
Need to fix bug described in https://musescore.org/en/node/184296 which I'm not going to reporduce here entirely, but the problem was that ExportMidi::writeHeader() would incorrectly write a default C keysig at tick 0 for every single time that when through any repeat list without finding a key signature.
Bug is in 2.0.3 and lastest 2.1-dev 3523f8f (but I haven't tested 3.0-dev).
I'll include export-as-midi_full-meas-intro.mscx:
as test file which when exported to midi should be like export-as-midi_full-meas-intro.mid, which when re-imported should looks like:
but which incorrectly looked like:
Which incorrectly appears to have no initial key sig, when it actually mistakenly had an initial Bb keysig followed immediately by an initial C key sig.
Comments
https://github.com/musescore/MuseScore/pull/3109
Fixed in branch 2.1, commit 41ab3d292d
fix #184376 ExportMidi::writeHeader() initial keysig overwrite
ExportMidi::writeHeader() would incorrectly write a default C keysig at tick 0 for every iteration through the RepeatList that did not contain a keysig. This meant that if there was an initial keysig, it would have been effectively overwritten it any sections in the RepeatList do not contain any keysig element.
The fix is to only write the fall back default initial C key sig if no key sigs were found at tick 0.
I guess master needs to get checked, whether It needs this too?
Fixed in branch master, commit 4627c59003
fix #184376 ExportMidi::writeHeader() initial keysig overwrite
ExportMidi::writeHeader() would incorrectly write a default C keysig at tick 0 for every iteration through the RepeatList that did not contain a keysig. This meant that if there was an initial keysig, it would have been effectively overwritten it any sections in the RepeatList do not contain any keysig element.
The fix is to only write the fall back default initial C key sig if no key sigs were found at tick 0.
:-)
thanks!
Automatically closed -- issue fixed for 2 weeks with no activity.