diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-11-17 03:50:14 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-11-17 03:50:14 +0300 |
commit | 28b712a96190c2148a985f4de820f42dafd91ac9 (patch) | |
tree | a2d48efac1441bcc05c600d65f0aa05219e1ef93 /src | |
parent | e7e58c9ddce0438505ba3aabffbf2a5af1896071 (diff) | |
download | libADLMIDI-28b712a96190c2148a985f4de820f42dafd91ac9.tar.gz libADLMIDI-28b712a96190c2148a985f4de820f42dafd91ac9.tar.bz2 libADLMIDI-28b712a96190c2148a985f4de820f42dafd91ac9.zip |
Let XG SFX1/SFX2 use LSB==1 range of percussion instruments of WOPL file
Diffstat (limited to 'src')
-rw-r--r-- | src/adlmidi_midiplay.cpp | 11 |
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) |