Author Topic: OPL2 notes fade away on loop or hang  (Read 768 times)

Offline oxxi

  • Inspired artist
  • **
  • Posts: 58
    • my computer musiks
  • Operating System: Win 7
OPL2 notes fade away on loop or hang
« 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.
////

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,622
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: OPL2 notes fade away on loop or hang
« Reply #1 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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline oxxi

  • Inspired artist
  • **
  • Posts: 58
    • my computer musiks
  • Operating System: Win 7
Re: OPL2 notes fade away on loop or hang
« Reply #2 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.
« Last Edit: January 10, 2019, 17:14:29 by oxxi »
////

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,622
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: OPL2 notes fade away on loop or hang
« Reply #3 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.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.