1 Knob + 4 Buttons into 4 CV values with takeover puzzle

I have a Line 6 FBV foot controller with 4 switches and a single pedal. I’m trying to use VCV modules so that I can use the switches to control 4 different CV values. I managed to build that (see image) and when switching to a new, lets call it channel, the CV level of the channel that was just left retains the right CV value.

Yellow: CV / Pedal, Blue: Switches, Green: Control, Red: Constants.

The next thing to implement is a smooth value takeover when returning to a channel. With that I mean that I want to move the pedal without adjusting the value until the pedal and remembered CV values are equal.

But when I try to implement this I start creating very hairy implementations.

For example when I try: If the value of the pedal is smaller than the remembered value for the active channel and you just switched to it, don’t adjust values until a comparator indicates a bigger than value and an edge detector detects the upward change, but only once, then just follow the pedal value regardless of relative size, if however the pedal is bigger… etc. etc. etc.

Cleary this is getting nowhere.

Any logic wizards that can cough up a solution or fellow VCV users who tackled a similar problem?

PS: DHE has a truth table module which might be useful.

PSS: An external solution with a MIDI implementation is welcome too. I can imagine that I’m not the first who bumped into this problem.

Answering my own question.

Stoermelder modules to the rescue.

MIDI-CAT has an option for takeover (Pickup snap) And MIDI-CAT-MEM has the option to switch a saved MIDI-CAT mapping of a particular device to the next or previous device instance in that lane. Teach MIDI-Cat to control an 8Vert. Save it. And use a second MIDI-CAT to control the ‘Next’ and ‘Prev’ buttons of MIDI-CAT-MEM