From 35d419cdadf1b64e256268db77e61d2f2e5eb46d Mon Sep 17 00:00:00 2001 From: RoqueDeicide Date: Thu, 29 Feb 2024 20:21:25 +0400 Subject: [PATCH] Added a GS DT1 MODE SET SysEx message after GM System Enable SysEx message to instruct the synth to switch to GS mode, if one is supported. --- source/musicformats/music_midi.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/musicformats/music_midi.cpp b/source/musicformats/music_midi.cpp index eb43daf..9dda9f4 100644 --- a/source/musicformats/music_midi.cpp +++ b/source/musicformats/music_midi.cpp @@ -815,7 +815,7 @@ int MIDIStreamer::FillBuffer(int buffer_num, int max_events, uint32_t max_time) if (InitialPlayback) { InitialPlayback = false; - // Send the GS System Reset SysEx message. + // Send the GM System Enable SysEx message. events[0] = 0; // dwDeltaTime events[1] = 0; // dwStreamID events[2] = (MEVENT_LONGMSG << 24) | 6; // dwEvent @@ -823,6 +823,15 @@ int MIDIStreamer::FillBuffer(int buffer_num, int max_events, uint32_t max_time) events[4] = MAKE_ID(0x01, 0xf7, 0x00, 0x00); // dwParms[1] events += 5; + // Send the GS DT1 MODE SET GS Reset SysEx message. + events[0] = 0; // dwDeltaTime + events[1] = 0; // dwStreamID + events[2] = (MEVENT_LONGMSG << 24) | 11; // dwEvent + events[3] = MAKE_ID(0xf0, 0x41, 0x7f, 0x42); // dwParms[0] + events[4] = MAKE_ID(0x12, 0x40, 0x00, 0x7f); // dwParms[1] + events[5] = MAKE_ID(0x00, 0x41, 0xf7, 0x00); // dwParms[2] + events += 6; + // Send the full master volume SysEx message. events[0] = 0; // dwDeltaTime events[1] = 0; // dwStreamID