SCI: MT-32 plays "warble" of notes when music resumes
|Reported by:||SF/sven3000||Owned by:||bluegr|
When music is resumed from a non-zero starting position (e.g. if music was paused or when a game is restored), the MidiParser::jumpToTick function fast-forwards to the correct position and sends all events to the driver (fireEvents==true in these cases). With some instruments on the Roland MT-32, this is audible, creating a "warble" sound - a flurry of notes played in rapid succession.
A very clear example of this happening is in the dwarves' mine in King's Quest 4 (note: you may need to clean their house first before you can stay their long enough to notice this). Stay in the mine, then start typing, press ESC, or save/load, anything that pauses the music. The "warble" is heard when the music resumes. This was observed with a real Roland MT-32; it's not really audible on the emulator in the scenario's I've tried.
The attached patch modifies the jumpToTick function so that it doesn't send "note on" messages to the driver. This solves the problem, and the behaviour matches the observed behaviour of the real SCI engine (under DOSBox), in that hanging notes are not resumed when the music resumes (which means it doesn't send a note on for those notes that were playing when then music was paused).
This patch fixes the issue I've mentioned, and has no apparent side-effects.
This was observed on ScummVM 1.2 and svn revision 54451, on Windows 7 x64, using a real Roland MT-32 attached via USB MIDI cable, with the "true Roland MT-32" option checked in the game's settings. I have noticed this effect in several games, and this patch apears to solve it.
Ticket imported from: #3117577. Ticket imported from: patches/1367.