Rotary encoder wrap around

I’m looking for ideas from our resident geniuses. I am trying to operate the vibrato/chorus rotary switch on the B-3X using a rotary encoder. B-3X wants a CC with 6 values evenly distributed over 0-127. The controller puts out +/-1. I have it basically working. But I can’t figure out how to make it work like the real hardware. The real switch does not stop at the ends. You can cycle through the 6 settings repeatedly without changing directions. My binding changes the setting with each click of the encoder and hits all 6 values, but it stops at each end. Can I make it wrap around?

button vib
I have the VB3 operating on a button, not a rotary, which advances through each value and wraps using a latch series in the input filter. It can probably be adapted for a rotary, but the button is very precise.
EDIT: Just realized I have it on an endless encoder too, which happens to be détented. Every click forwards or backwards, advances the selection, so you can’t reverse, but it wraps, nonetheless.

Thanks Ade! That worked perfectly turning the encoder clockwise. Not so much CCW. Here is my improved version.

First filter only allows 127 to go to what is basically your filter adjusted for my CCs and values. Third filter switches midi channel only allows 0 to go to stage 4 which is your filter backwards.

I wish this were a binding rather than a filter, but I don’t know how to do that. Yet?

1 Like

Cool improvement!!
Not sure a binding could fix anything this filter couldn’t, with the exception of being enabled and disabled on a state basis.
You could create a route which filters out everything except the data you’ve refined above, and that could be enabled/disabled per state, if that was your concern. Plus you can add a note to remind you what it’s doing.

It’s not a big deal. Lately my style has been to use bindings for “permanent” things like how a controller maps to a plug-in. This discussion, for example. I use filters more for song-specific stuff like keyboard routing, key ranges, who gets what pedal, etc. I don’t know if that is a common way to do it. Or even a good way to do it. Filter and binding capabilities seem to have quite a bit of overlap. It’s not always clear which to use.