Skip to content

Commit

Permalink
Added a GS DT1 MODE SET SysEx message after GM System Enable SysEx me…
Browse files Browse the repository at this point in the history
…ssage to instruct the synth to switch to GS mode, if one is supported.
  • Loading branch information
RoqueDeicide committed Feb 29, 2024
1 parent 654f29b commit 35d419c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion source/musicformats/music_midi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,14 +815,23 @@ 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
events[3] = MAKE_ID(0xf0, 0x7e, 0x7f, 0x09); // dwParms[0]
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
Expand Down

0 comments on commit 35d419c

Please sign in to comment.