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.
This fixes an bug which produced corrupted measures when splitting irregular length measures. In Score::cmdSplitMeasure() after the newly split measures are first created, if their new actual length was greater than their nominal length, then Measure::adjustToLen() would append additional padding rests at the end of the measure. However, the subsequent range.write() assumed that the measures were entirely empty before copying contents from the original measure into the new measures. The extra padding rests were unnecessary, and caused the resulting measures to contain too many notes than their actual length, hence the corruption.
The fix here is to add a default boolean parameter to adjustToLen() called appendRestsIfNecessary which is true by default so as to not change behavior when it is called without specifiying the parameter. However, cmdSplitMeasure() will call adjustToLen with that boolean explicitly false, so that the new measures don't get unnecessary rests.
Tests for basic functionally. Going between 128th duration & whole duration and applies commands 'half-duration', 'double-duration', 'dec-duration-dotted', 'inc-duration-dotted'
Class Score gets methods cmdDoubleDuration(), cmdHalfDuration(), cmdIncDurationDotted(), cmdDecDurationDotted() which are public wrappers around private method cmdIncDecDurationDotted.
Simplified the text description of the commands
Tries to add long note (breve) after a short 128th rest without crashing. Verifies that the resulting notes are tied over at least 3 times (to span 3 measures) and have total duration the same as a breve.