ModPlug Central

OpenMPT => Help and Questions => Topic started by: oxxi on January 10, 2019, 05:47:45

Title: OPL2 notes fade away on loop or hang
Post by: oxxi on January 10, 2019, 05:47:45
I have one channel with notes using an Opl2 instrument with NNA set to continue. I loop the pattern and eventually the notes die out or hang in some cases. Why is that? Seems I can't reliably make polyphonic stuff with the Opl2 instrument. Attached is a sample file.
Title: Re: OPL2 notes fade away on loop or hang
Post by: Saga Musix on January 10, 2019, 09:38:31
The OPL3 chip has a maximum polyphony of 18 notes for 2-op instruments. After a few loops, your module reaches this limit.
Title: Re: OPL2 notes fade away on loop or hang
Post by: oxxi on January 10, 2019, 17:09:38
So what would be the best way to write polyphonic stuff with an Opl2 instrument? I thought that shorter decay and release settings would end the notes. I even unchecked the sustain boxes and it still does the same thing and the notes are only triggered one at a time.  It just doesn't behave as expected like a normal modplug instrument doing the same test.
Title: Re: OPL2 notes fade away on loop or hang
Post by: Saga Musix on January 10, 2019, 17:49:55
OpenMPT has no knowledge of the play status of a note inside the OPL emulator, i.e. it doesn't know if the note stopped playing due to the envelope reaching zero volume. This makes using NNA Continue dangerous with OPL. You need to either explicitly send note-offs for each note, or apply an instrument envelope that eventually reaches zero volume.