Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging GS instruments with ADLMidiPlay #38

Open
sneakernets opened this issue Feb 20, 2018 · 5 comments
Open

Debugging GS instruments with ADLMidiPlay #38

sneakernets opened this issue Feb 20, 2018 · 5 comments
Labels

Comments

@sneakernets
Copy link
Owner

A little trick I found with GS instruments (to knock it out of XG mode)

Line 989 of adlmidi_midiplay.cpp:

        bank = (uint16_t(Ch[channel].bank_msb) * 256) + uint16_t(Ch[channel].bank_lsb);

Should be

        bank = (uint16_t(Ch[channel].bank_msb)) + uint16_t(Ch[channel].bank_lsb);

This allows GS to work for now.

@sneakernets
Copy link
Owner Author

This totally breaks XG, notes will not play

@Wohlstand
Copy link

Wohlstand commented Mar 26, 2018

Numeric of GS banks is going as:

Wher real combined MSB and LSB by my formula when thinking as Bank Number is unsigned 16-bit integer. Same you will catch inside of MIDI file (MSB event is GS-specific event. LSB bank event is XG event. Possible to use both of them).

Real MSB
0 0
256 1
512 2
768 3
1024 4
1280 5
1536 6
1792 7
2048 8
2304 9
4096 16
6144 24
8192 32

So, when I have set MSB as 8:
default

and when I have made a dummy MIDI file that uses this bank:
default

Then, it working fine!

gs-ukulele-test.mid.gz

Just for a comparison, same test which uses zero bank:

gs-jazz-test.mid.gz

@Wohlstand
Copy link

Wohlstand commented Sep 10, 2018

One note came from this issue: Wohlstand/libADLMIDI#136
Extra LSB bank numbers are giving next additions:

1 being SC55, 2 being SC88, 3 SC88 Pro, 4 SC8820

The 0'th LSB is the default fallback, and 1,2,3,4 are meaning different version of same instrument per each synthesizer.

libADLMIDI now supports correct MSB and LSB logic for GS on it's backend, the one thing is left - to polish the bank itself to equip it with necessary instruments.

@freq-mod
Copy link
Contributor

freq-mod commented Sep 11, 2018

...wait.
Let's say we have a GS Bank no. 8 (MSB=8). It's needed to create a separate bank for SC-55 only instruments (LSB=1), another separate bank for SC-88 instruments (LSB=2) and so on?

@Wohlstand
Copy link

Wohlstand commented Sep 11, 2018

If there are different - yes, but keep the LSB=0 to be a default fallback. When given LSB is missing, it falls into 0 on the same MSB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants