Any idea? ML Sequencer controlled switching back and forth with "first" trigger

If anyone is curious why I thought ML Switch output mode change to Last was necessary…

Let me apologize in advance for not trying to square the following with the documentation. I also did not give this a whole lot of thought beyond the task of adding a ping-pong traverse using a test patch provided in this thread.

Here is a small clip of the ML Sequencer test2 patch uploaded in my previous post with the Switch output toggled between Last and Zero. I changed CV values of the first and last two CV values on track one of the sequencer to show what happens.

This animated gif starts with the Switch output mode set to Last and here is a detail from the animated gif with the Switch output mode set to Last

Notice the stepped CV values (red) associated with the First (yellow) and Last (green) values. Also, the First and Last look like gates.

And the detail when the Switch is reverted to the default Zero output mode

The first and last values of the sequence are not played and the First and Last output values now appear as triggers.

thank you for that. as far as i understand, your mode “last” seems correct? a gate on last and first step and the steps are played.

Thanks, it helps to see the patch in action. It does look like the ping pong is working properly when using the switch LAST mode, though there is some weird stuff going on that I don’t understand. The switch trigger is constantly fluttering rather than having a distinct gate each time the sequencer switches direction. It might be working from a practical sense, but it looks “unclean”.

The First/Last spikes while in zero mode are exactly what I was describing/predicting in my analysis. You immediately switch direction the moment the First or Last step is entered, which sends the clock to the opposite direction trigger, and the step is immediately exited. That is why in my patch I wait to trigger my flip flop (the corollary to your switch) until the trailing edge of the clock gate, so the clock is no longer high when the direction is switched.

I am pretty sure if you adapted my setup that it would indeed have the correct ping pong behavior, and there would be a single clean flip flop triggering gate each time the sequencer changes direction - no more trigger fluttering.

interesting details i do not fully understand. but i will play with both in the evening. it seems to me, that the idea from @DaveVenom is more robust. the direction change happens only and immediately after the step. or am i wrong?

Setting the switch output mode to Last is needed for the first and last CV values of the sequence to play.

If the ML Seq/Switch combo worked using default values I would not have bothered posting about the switch.

LAST mode is not needed if you delay sending the direction change trigger until after the main clock gate goes low.

For sure, there are a variety of solutions. I am not sure how to score them or if it even matters.

The easiest thing for me to get the CV values to play at the right time in the right order was to change the switch.

yesterday evening i tested the different ideas. the patch from @DaveVenom made it. works exactly as i want. i put in a switch to make the direction intentionally. thank you all for the ideas!

now i will check how i could synchronise the two phasors.

hello, unfortunately the idea from @DaveVenom does not work as expected. switching is working, but if i switch from forward to backward and vice versa, i get a slip of 1-2 steps in comparing to the other sequencer of lane b.

any ideas? here is the actual patch.

ML Sequencer Test.vcv (5.2 KB)

That “slip” is inherent to the ping pong design that I specified. Assuming 4 steps - 1,2,3|4,3,2|1,2,3| . . .

Yes there are 4 total steps, but the “phrase” is effectively 3 steps, not 4.

I think more than worrying about how to implement something, you first need to be clear and precise about what you are trying to achieve.

I suspect you want the ping pong pattern to repeat the 1s/last step each time. In other words - 1,2,3,4|4,3,2,1|1,2,3,4| . . .

That requires a different implementation. Perhaps the easiest is to switch which step is used to trigger the direction change. If moving forward, then change direction on step 1. If moving backward, then change direction on the last step. But you can’t change direction the first time you reach the trigger step. Instead the first time it is reached you need to arm the direction change. Then the next time it actually triggers the direction flip flop. Also, use the original clock signal to trigger the flip flop, not the falling edge trigger.

So if moving forward at the last step and the direction change is already armed, then the next forward step trigger moves to step 1. The First gate is ANDed with the triggering gate, and the direction is immediately switched at the flip flop. This redirects the triggering clock to the backward trigger, and step one is immediately left and the sequencer goes back to the last step. So the step one was so fast, it is virtually skipped, and the last step is effectively repeated. Upon re-entry to the last step, it must arm the direction change so that the next time the last step is entered, it changes back to forward. etc.

In summary, the trick to make things work depends on the pattern you want.

ping pong, do not repeat first/last step:

  • If forward, then Last changes direction. If backward, then First changes direction.
  • change direction on triggering clock falling edge to prevent immediate exiting of the step

ping pong, do repeat first/last steps:

  • if forward, then First changes direction. If backward, then Last changes direction.
  • The first time the triggering step is reached, arm the direction change. Only change direction on the second entry.
  • change direction on the leading edge of the triggering clock so the step is exited immediately, almost as if it was never fired, and the previous step is effectively repeated.

thank you for the explanation. i will try to patch it :thinking:.

and i think, that i have to write more precise. what i want is direction change on the last or first step in sync with the running second lane. ping-pong is nice, but not primary what i want. sorry for the confusing. @DaveVenom