Author Topic: [SOLVED] Pattern Loop Only Works Once Per Channel  (Read 638 times)

Offline I-S3-O

  • Active artist
  • *
  • Posts: 43
  • Gender: Male
  • Operating System: Windows 10 Pro
[SOLVED] Pattern Loop Only Works Once Per Channel
« on: October 03, 2018, 05:20:28 »
I have a problem with some looping I'm trying to do.

So I have these three patterns that play back-to-back, but I want each one to loop once before moving on to the next one. So I tried to use the "SBx" Macro OpenMPT has. For the first pattern it worked; not problems at all. However, for the following patterns it ignored the macro completely, and went on to the next pattern.

Now I found a way around it by moving the following macros to other channels (e.g. macro in channel one on pattern one, channel two on pattern two, etc.), but that seems highly unnecessary to me. Plus, that also means I can only use the macro once per channel per pattern.

I'm not sure why it's happening. If that's the way it's supposed to work, then I'm a little confused as to what that looping macro is for. A little help understanding this?
« Last Edit: October 03, 2018, 21:41:06 by I-S3-O »

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,490
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: Pattern Loop Only Works Once Per Channel
« Reply #1 on: October 03, 2018, 08:55:13 »
Please show a minimal example module that exposes this problem (try to remove anything that doesn't contribute to the problem, such as samples and other pattern content), as I cannot reproduce it.
» 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 Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,490
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: Pattern Loop Only Works Once Per Channel
« Reply #2 on: October 03, 2018, 16:04:21 »
After thinking about this some more, I think I figured out what you did and can happily say that everything works as intended.
You forgot to add a SB0 effect to mark the beginning of your loop. In this case, Impulse Tracker will remember on which row a previous loop ended and restart the loop from the line following the previous loop's end. If all patterns / loops have the same size, this means that the loop will try to restart from a non-existing row and just skip to the next pattern.
Hence, never forget to enter the SB0 effect to denote the start of your pattern loop.
» 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 I-S3-O

  • Active artist
  • *
  • Posts: 43
  • Gender: Male
  • Operating System: Windows 10 Pro
Re: Pattern Loop Only Works Once Per Channel
« Reply #3 on: October 03, 2018, 21:40:42 »
That fixed it! Thanks. Sorry it took so long to get back to this; I was at work, so I can't respond.

Offline Kyleroo

  • Shy artist
  • Posts: 1
  • Gender: Male
  • Operating System: Windows 7
Re: [SOLVED] Pattern Loop Only Works Once Per Channel
« Reply #4 on: October 06, 2018, 13:57:41 »
Well, it's a common bug for most trackers. The famous Fasttracker II has this bug at the beginning: E6x pattern loop should be placed on the same channel or it will begin at pattern 00. The advanced MilkyTracker didn't survived the bug, too.

FT2 also has an infamous bug that when you place E60 on a row other than the first, it will start on that row instead of beginning at the first.

Example: I placed an E60 at row 05 and an E62 at row 08. When I play the song, the song will start at row 05 instead of starting at row 00.

As you expected, MT didn't survived the bug, aswell.

However, if you play the song while you're on the pattern, the bug will not occur. But if you are on a different pattern, the pattern ends and the next pattern has the arrangement, the bug will occur.

It can be avoided by adding a D00 pattern break at the preceding pattern, on the last row.