Switch Value: problem with keeping inputs/outputs open

Hi there,
I’m trying to switch between different outputs and also inputs. I’m using switch (value input) and switch (value output), I have to route three values from different to different io boxes.
My problem is, that the switch-nodes have to be switched by a very short signal ( values 1-6), but need to stay in this position untill getting next signal (except 0). How can I avoid switching to 0 (getting 0 if there’s no signal) and keep data rolling untill next signal (1-6)?
I cannot change signal lengths, while it comes as osc from flash.
Thanks for your help with that!


In other words:
if 1: output 1
if 2: output 2

if 0: do nothing

outputs need to stay 1-6, when input is 0

what do you mean if 0 do nothing? output NIL?

can you post a patch and simulate the OSC input?

if input is 0: use last input >=1

here’s a sample patch

dont_switch_0.v4p (5.8 kB)

I think you may just need to use the S+H (Animation) node. Sample and hold. See attached patch. I don’t really get if you still need the switch in there for some reason. I’m not sure you even need the switch anymore.

dont_switch_SH.v4p (6.1 kB)

That’it! S+H is eactly what I needed. But I need the switch, to route different ins to different outs. I used S+H this way, see example patch.
Thank you, xd! I can’t count the beers I owe you (if we ever met), anymore ;)

dont_switch_0_SH.v4p (11.3 kB)

Hey no problem. glad to help. all I can hope is you keep an eye out on the forums in the future and help others when you can. good luck with your project.