View Issue Details

IDProjectCategoryView StatusLast Update
0001323OpenMPTAudio I/Opublic2020-05-16 11:30
Reporterteimoso Assigned ToSaga Musix  
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Platformx64OSWindowsOS Version10
Product VersionOpenMPT 1.29.00.* (old testing) 
Target VersionOpenMPT 1.29.01.00 / libopenmpt 0.5.0 (current stable)Fixed in VersionOpenMPT 1.29.01.00 / libopenmpt 0.5.0 (current stable) 
Summary0001323: During playback (using OPL?), Channel 1 may stop being processed if no free NNA/preview channels can be found
Description

While playing back MPTM modules with OPL instruments in use, and if the user (keyjamming) plays multiple notes at the same time at the immediate start of a pattern, Channel 1 seems to stop being processed (even when it only plays sample instruments). I say "stop being processed" because Channel 1 either becomes silent or hangs on the last note.

Steps To Reproduce

In my experience, (human) reproduction is difficult due to the precise timing needed.

I've reproduced it a few times with these steps:

  1. Create an MPTM module with 5 channels and 1 pattern
  2. Add two instruments: one sample, one OPL
  3. Place notes across the first four channels, but ensure Channel 1 does not use the OPL instrument
  4. Start playback
  5. Play multiple notes at the exact time the pattern loops to the start, assuming OPL notes are coming from the pattern or user

A module file is attached, and can be used to skip steps 1-3.

If successful, Channel 1 will no longer be processed until playback stops.

Perhaps coincidentally, I have not been able to reproduce the issue without OPL instruments, without instrument mode, or keyjamming with the same instrument as Channel 1.

Additional Information

I have not tested with any other formats than MPTM, or without any free channels.

Originally, I encountered the issue in an MPTM module with 10 channels while playback was locked to two patterns. In the first row of both patterns, Channel 1 only contained a Note Off event. As the problem was occurring, pitch sliding effects in Channel 1 were inaudible (it did not contain any other type of effect).

It might be relevant that OpenMPT crashed once while I was trying to reproduce. It froze at the instant a pattern looped back to the beginning, while I was rapidly playing notes using an OPL instrument. Unfortunately, no memory dump was created, and at the time I wasn't aware I could try to get one through other methods.

TagsNo tags attached.
Has the bug occurred in previous versions?Unknown
Tested code revision (in case you know it)r12808

Activities

teimoso

teimoso

2020-05-15 05:46

reporter  

ch1_example.zip (537 bytes)
Saga Musix

Saga Musix

2020-05-15 13:57

administrator   ~0004313

I couldn't reproduce it so far, so I think a few more things need to be clarified:

  1. Are you triggering those notes in the pattern, sample or instrument editor?
  2. In case of pattern editor: Is pattern recording enabled?
  3. Is "Loop Pattern" enabled, or is the pattern looping due to "Loop Song" being activated?
  4. If the latter, is "Reset channels on loop" (General settings) enabled?

To me it seems more likely that the problem is related to song looping rather than pattern transitions, although the former of course implies the latter. Either way this is rather mysterious, because keyjazz uses a different set of playback channels than pattern notes.

Saga Musix

Saga Musix

2020-05-15 14:01

administrator   ~0004314

Maybe a short video demonstrating the problem would also help. You can use the Windows Game Bar (Win+G) for that.

Saga Musix

Saga Musix

2020-05-15 17:13

administrator   ~0004320

I found one suspicious code path that could cause problems in instrument mode, but only if lots of NNA-ed notes (about 250) stack up. Maybe you're somehow managing to trigger that path but so far I can't, especially with such a simplistic module.

Saga Musix

Saga Musix

2020-05-15 19:02

administrator   ~0004322

Can you please check if r12838 works better for you? It will be available from https://builds.openmpt.org/builds/ soon.

teimoso

teimoso

2020-05-15 19:25

reporter   ~0004323

  1. Are you triggering those notes in the pattern, sample or instrument editor?

The pattern editor.

  1. In case of pattern editor: Is pattern recording enabled?

No.

  1. Is "Loop Pattern" enabled, or is the pattern looping due to "Loop Song" being activated?

With "Loop Song" activated, the issue occurs with or without "Loop Pattern" enabled.

If the latter, is "Reset channels on loop" (General settings) enabled?

No.


I was mistaken; it turns out the issue is not related to the start of the pattern at all, and can happen at any row. I suspect it has something to do with Note Off / Note Cut events, but this is just a guess.

I never used instruments with an NNA setting other than "Note Cut" when seeing this problem, so I'm not sure if that's related.

And yes, my bad, the previous example module wasn't so great for testing; for what it's worth, after changing the file, I've had success by just mashing keys during playback.

Attached are:

  • two videos, each representing one instance of the issue
  • a modified version of ch1_example.mptm (switched to instrument mode, pattern is now 64 rows, and pattern content is slightly different)
vid_vibrato.zip (459,167 bytes)
vid_slide.zip (457,509 bytes)
ch1_example-2.zip (1,207 bytes)
Saga Musix

Saga Musix

2020-05-15 20:36

administrator   ~0004327

Build r12838 is now avilable on https://builds.openmpt.org/builds/ - please try it.

teimoso

teimoso

2020-05-15 22:33

reporter   ~0004329

The issue appears to be gone in r12838. Thanks for the quick response!

Issue History

Date Modified Username Field Change
2020-05-15 05:46 teimoso New Issue
2020-05-15 05:46 teimoso File Added: ch1_example.zip
2020-05-15 05:47 teimoso Description Updated View Revisions
2020-05-15 13:57 Saga Musix Note Added: 0004313
2020-05-15 14:01 Saga Musix Note Added: 0004314
2020-05-15 17:13 Saga Musix Note Added: 0004320
2020-05-15 18:15 Saga Musix Assigned To => Saga Musix
2020-05-15 18:15 Saga Musix Status new => assigned
2020-05-15 19:02 Saga Musix Note Added: 0004322
2020-05-15 19:02 Saga Musix Status assigned => feedback
2020-05-15 19:02 Saga Musix Target Version => OpenMPT 1.29.01.00 / libopenmpt 0.5.0 (current stable)
2020-05-15 19:25 teimoso Note Added: 0004323
2020-05-15 19:25 teimoso File Added: vid_vibrato.zip
2020-05-15 19:25 teimoso File Added: vid_slide.zip
2020-05-15 19:25 teimoso File Added: ch1_example-2.zip
2020-05-15 19:25 teimoso Status feedback => assigned
2020-05-15 20:36 Saga Musix Status assigned => feedback
2020-05-15 20:36 Saga Musix Note Added: 0004327
2020-05-15 22:33 teimoso Note Added: 0004329
2020-05-15 22:33 teimoso Status feedback => assigned
2020-05-15 22:34 Saga Musix Status assigned => resolved
2020-05-15 22:34 Saga Musix Resolution open => fixed
2020-05-15 22:34 Saga Musix Fixed in Version => OpenMPT 1.29.01.00 / libopenmpt 0.5.0 (current stable)
2020-05-16 11:30 Saga Musix Summary During playback (using OPL?), Channel 1 may stop being processed if the user plays notes at the start of a pattern => During playback (using OPL?), Channel 1 may stop being processed if no free NNA/preview channels can be found