Wohlstand / libADLMIDI

A Software MIDI Synthesizer library with OPL3 (YMF262) emulator
GNU Lesser General Public License v3.0
175 stars 17 forks source link

Implement XG and GS standard backend #31

Open Wohlstand opened 6 years ago

Wohlstand commented 6 years ago

This standard is not only defines an extra instrument banks, it also declares an extra bank codes are will turn melodic channel into percussive.

What we are must to support:

Bank change LSB/MSB

More information (in Russian): http://eastua.narod.ru/html/docs/xg/1.3.html Detailed sheet of sound sets: http://www.deepsonic.ch/deep/docs_manuals/yamaha_qy70_list_book.pdf

Controllers

NRPN

SysEx

Wohlstand commented 6 years ago

Since this commit, library now is able to handle XG banks!

The demo file that showcases playing drums on different channels (with using of different panning for every channel):

(P.S. The bank was used 68'th, aka "4op bank by James Alan Nguyen and Wohlstand" where I have imported some Sneakernets' drums to debug support for dual pseudo and real 4-operator channel instruments inside of same bank)

Even without having of complete XG bankset, now we are able to correctly listen XG-standardized MIDI files are using custom drum channels

Wohlstand commented 6 years ago

Okay, I will need to fix drum length expander code that applying to 10'th channel only. To let the fix work, check the current bank LSB/MSB for XG percussion and then use drum length expander when XG percussion is set on this channel.

EDIT: Fixed!

Wohlstand commented 6 years ago

Okay, I have been checked out that on software Yamaha SYXG50 turning XG mode needs for "XG Reset" SysEx message F0 43 10 4C 00 00 7E 00 F7, otherwise, process MIDI file as GM file. Also "GS Reset" to identify GS-standardized MIDI files. However, GS needs for extra SysEx events to set drum channels.

Wohlstand commented 6 years ago

Small demo of CC74 in use:

CC74 was added in https://github.com/Wohlstand/libADLMIDI/commit/9166fd48255c7002ba9fbc7a4679a49da544e8c3 and https://github.com/Wohlstand/libADLMIDI/commit/9a9cc5e5ff305114acfb248b65056403ed2e64e6

photo_2017-11-27_12-25-32

Example 1 (62'th bank)

Example 2 (62'th bank with percussion gotten from 68'th bank)

Example 3 (68'th bank)

Example 4 (47'th bank), best example because of powerful bass.

Anyway, it doesn't affects AM-only instruments, it affects instruments are using FM connection

freq-mod commented 4 years ago

Hello. A certain midi file has caught my attention, as when played in adlmidiplay it produces this message: - Debug: SysEx: Caught Roland System Mode Set: 00 - Debug: SysEx: Caught invalid roland SysEx message!

MIDI plays fine, without any noticeable glitches, yet I find it weird, as it was bundled alongside normal SC-88Pro .mids

File in question - Air15_8p.mid.zip

Wohlstand commented 4 years ago
  • Debug: SysEx: Caught invalid roland SysEx message!

I bet, it has an invalid checksum, let's check...