mkarcher wrote on 2025-09-28, 17:53:Just changing the frequency will not re-start the envelope.
Yeah, only note-on restarts the Envelope Generator (and Phase Generator). Also unlike PG, the EG will not zero out attenuation on note-ons and current attenuation is used as starting point for the next note. As a result, sounds with slow attacks can have their attacks eaten up if not enough time is given after a note-off for things to quiet down. Slow attacks on new notes can help with clicks too but it won't work for a lot of sounds unfortunately and waiting for a channel to become silent before new note isn't always an option either...
OPL family also has lower resolution on most parameters which isn't helping things either but as far as OPL3 goes, the massive amount of channels will definitely be able to maximise the channel overlap or perhaps alternating, both of which will allow some nice chorus effect when done right. It is unfortunate there are only 2 presets for the release parameter however.
But if one wants to go beyond the original chip then implementing note-ons at zero crossings of the waveform will avoid nearly all the clicks entirely, although with (very) low frequencies there can be significant timing jitter due to the long wavelengths of the waveforms. When I was writing my OPN2 emulator, I had the phase generator reset accidentally missed and it avoided almost all the clicks (remaining ones only came from instant attacks) and it also gave a nice "lively" sound since all the modulation inputs kept freerunning. One day I'll make an "OPN4" and it'll feature per operator PG reset bits just for this sort of stuff, and perhaps zero crossing waits for some things too.