Skipping steps in a note driven Step Sequencer

Aera's icon

I have this pretty straightforward sequencer that advances with each incoming midi note. So far so good - but I'd like to skip certain steps, without breaking the note on / off relationship. When I want to skip step 5 for example, the note pairs should be going to 0, 1, 2, 3, 4, 6, 7.

I also still want to be able to change the length of the loop itself.

I've made this kind of work with using zl.filter, zl.len, zl.nth and a counter, but off course this didn't keep my note offs in the correct destination.

Maybe route is not the right tool for this? Is there some kind of "round-robin" distributor where I can skip certain steps? A switch? Or can coll be used somehow?

Max Patch
Copy patch and select New From Clipboard in Max.

Aera's icon

"I also still want to be able to change the length of the loop itself" - actually I just realized if I can skip steps, I don't need this as I can simply skip step 7 to decrease my length. Good morning.