Modulo TRC with non-standard pattern lengths

Hey @rikrak, @avantronica
Sorry for taking so long to look into this.

What you need to understand about the modulo function is that it’s all about counting.
When you set a step to modulo 1:8 it will count the current track’s number of loops and trigger the step once the conditions is true (first out of 8 loops)

What the Master Length setting does is to reset the main counter. This is separate from all the track counters.

The track will then reset to its first step once the Master Length reaches its maximum count and start playback again. If it hasn’t finished its loop, the modulo will not count it properly. This causes the behavior you are describing. Try counting every time the track goes from 1 to 5 and back. Note that it will trigger every 8th time this happen. The double trigger is caused by the clock reset happening on the same loop as the modulo condition being true.

It’s not really that strange when you think about how the modulo function actually works, and that everything is dependent on counting. I would advise against using a Master Length with modulo since it might require some extra fiddling for things to go like expected.

It is not a bug, merely a side effect of how these functions intertwine. The downside is of course this behavior, but the upside is that since each track has its own counter, more complex behaviors can be achieved.

(And as always, use quirks to your advantage … Perhaps exploiting this can lead to some very interesting results??)

1 Like

I was only using Master Length to get around the CHNG bug.

I see your point about the Master Clock resetting the Modulo count and if that is what is happening, it makes sense.

Swapped my A4 for an MD today, so that will be my last word on the wonders of Modulo. :pl:

I don’t quite concur that it’s clearly not a bug, anyway, to clear things up using a better diagram for future readers; unless I’ve misunderstood what the ‘main counter’ reference was, it’s as I described earlier in the thread … the counter only counts if the track reaches its own end, not necessarily if the transport actually passes the trig !

So, e.g. if a Trig on 1 had a modulo of 2:X and the Master Length was less than the track length e.g. 14 for a Track of length 16, then the Trig would never sound, conversely if it was 1:X, it would sound every pass ! This isn’t a good manifestation of the modulo system, it’s quite compromised, the change in the algorithm required to fix this may not be trivial, but it doesn’t seem insurmountable to me … the master length reset would also have to update the count as if the track end had actually been reached.


The following is the example cited above, Track length 5 : Master length 12 : Trig on 1 with Modulo 1:3


:arrow_forward::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::arrow_forward::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:

:radio_button::white_circle::white_circle::white_circle::white_circle::radio_button::white_circle::white_circle::white_circle::white_circle::radio_button::white_circle::radio_button::white_circle::white_circle::white_circle::white_circle::radio_button::white_circle::white_circle::white_circle::white_circle::radio_button::white_circle:

:one::white_circle::white_circle::white_circle::white_circle::two::white_circle::white_circle::white_circle::white_circle::leftwards_arrow_with_hook::white_circle::three::white_circle::white_circle::white_circle::white_circle::one::white_circle::white_circle::white_circle::white_circle::two::white_circle:

:o::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::o::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:

:red_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::red_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:


:arrow_forward: = Master Length Reset
:radio_button: = Trigs evaluated
:one: = Valid counts
:leftwards_arrow_with_hook: = Ignored count due to not reaching full length of individual track
:o: = Trigs sounded
:red_circle: = Trigs sounded if counting was accurate


Okay, I can see that the process works this way because the Modulo count is not stored unless the track reaches its own length, this is therefore a function of the way the count is monitored and updated, not a reflection of the actual number of times the individual trig is actually passed

Knowing why something behaves in a certain way is helpful, and indeed, it’s possible to have fun with quirks, but that doesn’t stop it being inconsistent, or just a flaw in the counting algorithm i.e. what some would call a bug

In my example, the result of 1:3 if counted properly would coincidentally be a rather dull behaviour mimicking the master length reset exactly, but you at least get what you asked for, a spacing of a trig which occurs every three passes, by having this algorithm as it stands, you end up with a result where the spacing can be either consecutive or actually further apart than you anticipated

It may not be fixable, but it’s certainly a buggy oversight imho

1 Like

It is not a bug. The program is doing what it is supposed to do.

As is expected. Like I wrote, the counters used for the modulo function is per track. If you then disrupt the track’s playback via the master length, then the modulo function will exhibit this issue.

However, a solution would be to have yet another clock layer, but that is not how it is designed.

1 Like

@avantronica Presumably, once the CHNG bug is fixed, Master Len can be set to INF and the Modulo count will occur as expected.

I expected a trig’s Modulo counter to be evaluated on the trig - the same way as the other TRCs eg. % or NEI. I guess this would require an extra byte of storage that is not available or something.

I think there was a mention of Overbridge getting some sort of sequencer implementation but I expect resources will be allocated to shiny new boxes for the forseeable future.

1 Like

Right. (A fix is out very soon, currently testing it)

1 Like