Jepael wrote:I also don't get the EG reset. At any point the key-on goes from 0 to 1, EG will start the attack phase, but from whatever previous volume, which is not zero if the sound was decaying/releasing.
Same with release, at any point the key-on goes from 1 to 0, the EG will start the release phase, even if it did not fully attack/release. I think. I have not verified this.
This is actually correct behaviour what you're describing. It exhibits features which benefit mono-legato voice playback support (which I'm using to support in my MIDI driver fork). This is also very common with other FM chips, to continue from previous voices on next key on, following from their current position on a channel's assigned envelope.
http://djtbmx.jamesoz.com/junk/opl3vgmlog-egbug.zip
The bug I'm describing however, is where this fails. I've attached a zip which contains the following files:
opl3test-egbug - Two drum notes both with falling pitch being demonstrated via Fnum+keyons without a key off
opl3test-egbug2 - A fast-attack marimba patch playing a single sustained chord for a few bars, with fnum+keyons for software-driven vibrato
Each of the above tests come with the following:
- vgm file = playable (via in_vgm/VGMPlay/foo_gep) register log of YMF262 commands being received. (these are just two MIDI notes being played, whose notes/patches have a software pitch envelope attached to them to attain that 'falling' pitch sound)
- txt file = text-readable representation of the above file (used vgm2txt)
- cmi8738output wav = output of the above, using my CMI8738. The long silence is intentional since these are long-held notes, to let the driver spam f-num data to the chip as observed in their txt.
- khokh2001output wav = output of the above, using khokh2001's emulated core. Note the intermittent attacks that follow, suggesting reset envelopes on key on without a key off between.
The YMF724F-V matches the behaviour of the CMI8738 recording, as do Jarek's MAME and DOSBOX ADLIBEMU cores. If anyone with a real SB16 could play the .vgm log through VGMPlay via OPL passthrough, you can check if this happens with your hardware too (however I am confident this will result in confirming my findings anyway)