OPL3BankEditor icon indicating copy to clipboard operation
OPL3BankEditor copied to clipboard

Drums in rythm mode are playing incorrectly

Open Wohlstand opened this issue 7 years ago • 15 comments

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 avatar Apr 12 '18 08:04 Wohlstand

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.

Wohlstand avatar May 20 '18 00:05 Wohlstand

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?

freq-mod avatar Feb 23 '19 15:02 freq-mod

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 avatar Feb 23 '19 15:02 Wohlstand

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...

Wohlstand avatar Feb 23 '19 15:02 Wohlstand

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:

  • when only bass, tomtom and snare drums are of present or of percussive mode, it's fine
  • adding cymbals or hi-hats into quations often results in weird things, either hi-hats won't play (it can be fixed by changing AR of grayed out operator value to 15) or they make snare drum sound weird.

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

freq-mod avatar Mar 10 '19 18:03 freq-mod

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

  • Opal completely lacks rhythm-mode implementation
  • JavaOPL3 has it implemented broken

On which emulators you are testing?

Wohlstand avatar Mar 10 '19 18:03 Wohlstand

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

freq-mod avatar Mar 10 '19 18:03 freq-mod

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.

nukeykt avatar Mar 14 '19 12:03 nukeykt

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.

freq-mod avatar Apr 24 '19 10:04 freq-mod

@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)

Wohlstand avatar Apr 24 '19 10:04 Wohlstand

Can you make some screenshots? tomgray

freq-mod avatar Apr 24 '19 10:04 freq-mod

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

jpcima avatar Apr 24 '19 11:04 jpcima

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.

freq-mod avatar Apr 24 '19 11:04 freq-mod

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

jpcima avatar Apr 24 '19 11:04 jpcima

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

Wohlstand avatar Apr 24 '19 14:04 Wohlstand

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

Wohlstand avatar Nov 25 '23 03:11 Wohlstand