aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/adlmidi_midiplay.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index 9fe1cfd..4705bc4 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -923,16 +923,21 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity)
{
bank = (uint16_t(Ch[channel].bank_msb) * 256) + uint16_t(Ch[channel].bank_lsb);
if(bank == 0x7E00) //XG SFX1/SFX2 channel (16128 signed decimal)
+ {
+ //Let XG SFX1/SFX2 bank will have LSB==1 (128...255 range in WOPL file)
+ bank = (uint16_t)midiins + 128; // MIDI instrument defines the patch
isPercussion = true;
+ }
if(bank == 0x7F00) //XG Percussion channel (16256 signed decimal)
+ {
+ //Let XG Percussion bank will use (0...127 range in WOPL file)
+ bank = (uint16_t)midiins; // MIDI instrument defines the patch
isPercussion = true;
+ }
}
if(isPercussion)
- {
- bank = (uint16_t)midiins; // MIDI instrument defines the patch
midiins = opl.dynamic_percussion_offset + note; // Percussion instrument
- }
//Set bank bank
if(bank > 0)