View Issue Details

IDProjectCategoryView StatusLast Update
0001671OpenMPTPlayback Compatibilitypublic2023-03-01 18:52
Reporterteimoso Assigned ToSaga Musix  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx64OSWindowsOS Version10
Product VersionOpenMPT 1.30.10.00 / libopenmpt 0.6.8 (upgrade first) 
Target VersionOpenMPT 1.30.11.00 / libopenmpt 0.6.9 (upgrade first)Fixed in VersionOpenMPT 1.30.11.00 / libopenmpt 0.6.9 (upgrade first) 
Summary0001671: 'Z7F' cutoff commands don't apply properly for OPL instruments unless filter envelope is enabled
Description

For an OPL instrument with no default cutoff and no filter envelope, a Zxx cutoff command placed at the starting row of a note doesn't apply until the next note (unless there is another 'Zxx' cutoff command in the meantime, in which case the first never takes effect). This only applies if the note previously had a cutoff value besides 7F; going from 7F to another value works normally.

This behavior changes depending on whether the instrument has default cutoff or its filter envelope is enabled:

  • if a default cutoff other than 7F is set, any Zxx cutoff command at the starting row of a note has no effect.
  • if the default cutoff is set to 7F, Zxx cutoff commands seem to work as expected (like OpenMPT 1.30.08.00), though Zxx cutoff commands of course work differently when default cutoff is set.
  • if the filter envelope is enabled, even if default cutoff is enabled and set to a non-7F value, Zxx cutoff commands seem to work as expected (like OpenMPT 1.30.08.00).
Steps To Reproduce

An example module is attached that demonstrates the issue.

  1. In a new MPTM module, create an instrument and assign an OPL sample to it.
  2. In a pattern, enter the example pattern data from this issue's 'Additional Information' section, or other pattern data that resembles it; entering various notes with different Zxx cutoff commands at the row they start on will likely demonstrate the bug.
  3. Play the pattern; Zxx cutoff commands at the start of a note which set the cutoff from a value other than 7F to something else won't apply immediately.
  4. Set a default cutoff value for the instrument and play the pattern. If the value is 7F, playback should sound normal; if it isn't, the Zxx cutoff commands should be ineffective.
  5. Disable the instrument's default cutoff, enable its filter envelope and play the pattern. Playback should sound normal.
Additional Information

Examples

Instrument 01 is an OPL instrument; it has no default cutoff set and its filter envelope is disabled.

ModPlug Tracker MPT
|A-401......
|===........
|A-401...Z00
|===........
|A-401...Z7F
|===........
|A-401......
|===........

The first two notes sound as expected, but the third note sounds as if it has the cutoff value 0, like the second note. The fourth note returns to cutoff value 7F.

ModPlug Tracker MPT
|B-401......
|===........
|B-401...Z5F
|===........
|B-401......
|===........
|B-401...Z7F
|===........

The last three notes sound as if they have the cutoff value 5F.

ModPlug Tracker MPT
|C-501......
|===........
|C-501...Z00
|........Z3F
|........Z5F
|........Z7F
|C-501......
|===........

All notes sound as expected; Zxx cutoff commands seem to work normally when executed anywhere other the starting row of a note.

If instrument 01 is changed for instrument 02, which is an OPL instrument with a default cutoff value of 60 set, the Zxx commands in the first two examples have no effect. In the third example, only the Zxx commands after the second note's starting row apply.

If instrument 01 is changed for instrument 03, which is an OPL instrument with the filter envelope enabled, the examples sound correct.

Example module

Instruments 01, 02, and 03 match what is described above. Pattern 0 contains the example pattern data above and uses instrument 01; patterns 1 and 2 are identical to it, but replace the instrument used with 02 and 03, respectively.

Other

Cutoff values are reported normally in the 'Patterns' tab status bar.

For OPL instruments in OpenMPT 1.30.09.00, Zxx cutoff commands don't last longer than the currently active note, and default cutoff isn't applied. Enabling the filter envelope also "fixes" the issue in this version.

Cutoff works properly for OPL instruments in OpenMPT 1.30.08.00.

r18404 / r18405 may be related but I'm not sure.

TagsNo tags attached.
Attached Files
Has the bug occurred in previous versions?Not as-is; OpenMPT 1.30.09.00 seems to have a related bug
Tested code revision (in case you know it)18674

Activities

Saga Musix

Saga Musix

2023-03-01 18:49

administrator   ~0005574

Fixed in r18782.

Issue History

Date Modified Username Field Change
2023-02-28 22:01 teimoso New Issue
2023-02-28 22:01 teimoso File Added: opl-late-cutoff-sample.zip
2023-02-28 22:12 Saga Musix Assigned To => Saga Musix
2023-02-28 22:12 Saga Musix Status new => assigned
2023-02-28 22:12 Saga Musix Target Version => OpenMPT 1.30.11.00 / libopenmpt 0.6.9 (upgrade first)
2023-02-28 22:21 Saga Musix Summary 'Zxx' cutoff commands don't apply properly for OPL instruments unless filter envelope is enabled => 'Z7F' cutoff commands don't apply properly for OPL instruments unless filter envelope is enabled
2023-03-01 18:49 Saga Musix Status assigned => resolved
2023-03-01 18:49 Saga Musix Resolution open => fixed
2023-03-01 18:49 Saga Musix Note Added: 0005574
2023-03-01 18:52 Saga Musix Fixed in Version => OpenMPT 1.30.11.00 / libopenmpt 0.6.9 (upgrade first)