Wohlstand / OPL3BankEditor

A small cross-platform editor of the OPL3 FM banks of different formats (Downloads in README below)
GNU General Public License v3.0
143 stars 12 forks source link

Drums in rythm mode are playing incorrectly #27

Closed Wohlstand closed 11 months ago

Wohlstand commented 6 years ago

Rythm-mode on OPL, OPL2 and OPL3 provides five channels for specified instruments: "Bass drum", "snare", "hi-hat", "cymbal", and "tom-tom". Current code manages them incorrectly, in result there are playing wrongly or giving silence. So, is need to rework / polish it.

Wohlstand commented 6 years ago

Most of Rhythm-mode percussions has been fixed and now there working fine! One issue is left that hi-hats are won't play on Nuked OPL3 emulator and the real OPL3 chip.

freq-mod commented 5 years ago

Looks like it's fixed now, one question though:

When selecting snare drum percussion type, and setting waveform to either 3, 4 or 5 there is no sound at all, instrument becomes silent. It happens on both Nuked at DOSBox, so is it proper behaviour?

Wohlstand commented 5 years ago

In OPL3 mode it's normal behavior, just now I have tried to switch mode of SBTibre into OPL3 and I have tried to switch channel modes between each other, and I have found the 3+ wave form affects differently between OPL2 and OPL3 modes. OPL3-BE mainly works in OPL3.

SBTibre and things of Jammie O'Connel are here: SB-Timbre+FM-by-JO.zip

I have used DosBox X fork https://github.com/joncampbell123/dosbox-x/releases which does use of Nuked OPL3 emulator and lot of other own things.

Note: the included MIDI driver needs Windows 3.1 or Windows 9x to work, but SBTimbre will work in pure DOS :fox_face: :wink:

Wohlstand commented 5 years ago

Anyway, I have found hats and cymbals are sounding differently in OPL3-BE / libADLMIDI and in SBTibre... It's need to compare the dumps and fix that at me...

freq-mod commented 5 years ago

While working, it's still kinda glitchy, for example...

  1. Create a snare drum instrument.
  2. Now create cymbal or hi-hat instrument.
  3. Play a newly created hi-hat
  4. Switch between emulators and forth
  5. It will sound totally different, like snare drum corrupts hi-hats timbre

Also, on libADLMIDI side, percussion mode instruments seem to go into some kind of conflict:

I discovered all of this when bored, tried to "improve" drums on Fatman's 2-op bank

Wohlstand commented 5 years ago

Note that only Nuked and DosBox are able to play rhythm mode drums. All other emulators are:

On which emulators you are testing?

freq-mod commented 5 years ago

Nuked and DOSbox. I know other are experimantal or broken. Also, some hi-hats sound slightly differently between Nuked and DOSBox. hihat.zip

nukeykt commented 5 years ago

DOSBox core has some issues with rhythm mode emulation. Itself rhythm mode implementation is most likely derived from MAME core with some heavy optimizations and likely devs missed something. MAME core and other cores that used MAME's rhythm implementation as reference(DOSBox compat, Nuked before 1.8) has no these issues.

freq-mod commented 5 years ago

There is one small, cosmetic bug - on instrument list, drums that are of "hi-hat" or "tomtom" type are grayed out, since they are on operator 1 rather than 2, even if they are present.

Wohlstand commented 5 years ago

@papiezak , are you not confused? Anyway, I have made the logic be same as SBTimbre does, or do you think something is wrong here? Can you make some screenshots? (for now I can't as I am at my job and busy)

freq-mod commented 5 years ago

Can you make some screenshots? tomgray

jpcima commented 5 years ago

The grayed state of the instrument has nothing to do with the algorithm. How exactly did you produce the problem? I wasn't able.

freq-mod commented 5 years ago

I forgot to add this bug is present after you set OP2 values to zero and restart bank editor, sorry about that. Anyway, tom-toms and hi-hats play on OP1, so OP2 is not needed.

jpcima commented 5 years ago

It's a measurer bug during the wopl export. It's not able to play the rhythm channel.

Wohlstand commented 5 years ago

Yeah, Measurer doesn't count rhythm-mode drums, it's an imperfection!

Wohlstand commented 11 months ago

Closing as abandoned. If anything needed, please re-open this.