Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XM bidi sustain loops #590

Open
jengelh opened this issue Jul 10, 2022 · 3 comments
Open

XM bidi sustain loops #590

jengelh opened this issue Jul 10, 2022 · 3 comments

Comments

@jengelh
Copy link

jengelh commented Jul 10, 2022

File: https://modarchive.org/index.php?request=view_by_moduleid&query=154144
Point of interest: position 0x22 (pattern 0x1f), channel 10 & 11.

The instruments on channel 10/11 will sustain after position 0x22 has finished playing and bleed into position 0x23. Commit 3156b25 fixed the issue, but I wanted to make sure the fix or testsuite is reasonably complete, because the commit message mentions IT sustains, but this is an XM file.

@AliceLR
Copy link
Contributor

AliceLR commented Jul 15, 2022

Thanks for the report. In OpenMPT the samples still continue into order 0x23 but they fade out due to the volume envelope. I'll check the test cases I added around this time to make sure this is covered.

I think this may not be the correct commit—the only change here was a hotfix to prevent IT sustain loops from crashing on sustain release due to a weird hack that only affected IT at the time.

@jengelh
Copy link
Author

jengelh commented Jul 15, 2022

More files where sample bleed across the end/loop point was observed—even with a comparatively modern libxmp, 8e4a5e1:

@AliceLR
Copy link
Contributor

AliceLR commented Sep 21, 2022

Okay, so going through all of these, I think I have to clarify some things, because this is not related to sample looping behavior and definitely isn't "sustain".

Sustain in tracker modules refers specifically to envelope sustain points/loops (XM, DBM, IT, etc.) or sample sustain loops (IT). When IT sample sustain is released with a key off event, the current playing sample switches to using its normal loop or finishes playing. The commit linked in the initial post specifically relates to a bug that would occur during the switch from a sample's sustain loop to its normal loop. XM does not have this feature, so again, this patch is irrelevant.

What you are observing is that channels continue to play notes between patterns. This is normal tracker behavior. This includes the pattern change when a module loops. (There is an exception with Modplug Tracker <=1.16 but it's not relevant for any of these modules.)

  • summer_morning_dream.xm: not a bug.
  • aws_ox9f.xm: uses F00 which stops playback in some XM trackers/players. libxmp ignores this and instead jumps to the restart position set by the module author, order 13. The channels that continue through this regularly do so elsewhere in the module. In other players the loop would be completely quiet due to G00, but xmp resets the global volume here, so the module repeats mostly normally instead.
  • aws_ox9s.xm: this is essentially the same module.
  • tas_blck.xm: same thing (H01/H00 and F00).
  • z_dimens.xm: same thing (G00 and F00).
  • dreamlike.xm: similar (G01).

Aside from the first, which is completely normal behavior, these are modules pretty clearly not intended to be looped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants