libADLMIDI icon indicating copy to clipboard operation
libADLMIDI copied to clipboard

Implement XG and GS standard backend

Open Wohlstand opened this issue 8 years ago • 6 comments

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

  • Melodic banks:

    • Banks №0-127 (MSB=0, LSB=0...127) — Normal Voice List.
    • Bank №8064 (MSB=63, LSB=0) — User voices banks ()
    • Bank №8192 (MSB=64, LSB=0) — SFX voice.
  • Percussive banks:

    • Bank №16128 (MSB=126, LSB=0) — SFX1 и SFX 2
    • Bank №16256 (MSB=127, LSB=0) — Turn melodic channel into percussive
  • Bank change of percussion channel based on patch state

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

  • [x] Portamento
  • [ ] Portamento Control
  • [x] Sostenuto (once hold currently playing notes and don't even try to hold any next)
  • [x] Soft Pedal (reduce velocity level on every note on while is on)
  • [ ] Harmonic Content
  • [ ] Release Time (pass to chip registers are relying on releasing)
  • [ ] Attack Time (pass to chip registers are relying on attacking)
  • [x] Brightness (set level of modulators)
  • [x] All Sound Off

NRPN

  • [ ] 0x01 0x20, data = mmH, Filter Cutoff Frequency (map to "Brightness")
  • [ ] 0x01 0x21, data = mmH, Filter Resonance (map to "Harmonic Content")
  • [ ] 0x01 0x63, data = mmH, EG Attack Time (map to "Attack Time")
  • [ ] 0x01 0x64, data = mmH, EG Decay Time (pass to chip registers are relying on decaying)
  • [ ] 0x01 0x66, data = mmH, EG Release (map to "Release Time")

SysEx

  • [x] Synth reset (GM/GS/XG mode switch)
  • [x] GS-way to setup drum channels etc.

Wohlstand avatar Nov 17 '17 00:11 Wohlstand

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 avatar Nov 17 '17 00:11 Wohlstand

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 avatar Nov 17 '17 09:11 Wohlstand

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 avatar Nov 19 '17 17:11 Wohlstand

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

Wohlstand avatar Nov 26 '17 13:11 Wohlstand

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

freq-mod avatar Oct 17 '20 10:10 freq-mod

  • Debug: SysEx: Caught invalid roland SysEx message!

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

Wohlstand avatar Oct 17 '20 10:10 Wohlstand