Still getting my head round PlugData and can’t figure out how I would toggle between ‘effect’ and ‘bypass’ using a momentary switch.
I basically want a switch that either goes ADC → DAC or ADC → FX → DAC
I’ve stripped it right back to basics and can use the momentary switch on my development pedal to turn on and off an oscillator, but struggling to see how to use that to achieve a bypass switch. I see how the switch spits out a 0 or 1 alternately, so i could turn on and off the ‘dry path’ but not sure how to get the inverse of these values in order to simultaneously turn on/off the ‘wet path’.
Sorry for the basic questions
You will want to use the _press
variant of your momentary switch. This will give a stream of 0
or 1
values.
Combined with the line~
to the bypass and an inverted signal to the full wet effect.
Haven’t tested yet, but I think this would work:
Thanks for the reply. Firstly, sorry i wasn’t clear initially, i’m using a momentary switch but want a latching function. I’ve tried it using the _press variant and also the regular fs1 @hv_param and in both cases i get the fx signal but no dry signal. As expacted with the _press variant the fx is only activated when the foot switch is held, with the regular fs1 it does latch as i would like but there is no dry still.
Thanks again for the help
Ok sorry, I thought you wanted momentary
So now you get either wet signal or silence?
Oops and I totally forgot to offset the inverted signal … derp.
Try this? it should continuously switch between 0
and 1
value based on the incoming bangs.
And now properly sets the wet signal (I think).
Thanks so much, I’ll give it a try when I get home. Yes before I was just getting wet signal or silence.
So what are the +1 and the %2 objects doing here?
I think further down the line when I make my own PCBs I’ll be using a 5v relay for bypass. I currently use these controlled with a ATtiny85 and 2N2222. I’m guessing the process is the same, I need to read the foot switch as I’m doing here and then send one of the daisy pins high. Do I do that using the receive object? Is that how it works for LEDs too? I haven’t looked into that yet
Thanks again for your help, it’s really appreciated!
It’s a counter, the modulo (% 2
) will allow it to “bounce” between 0 and 1 states.
But I think bang going into a toggle should work as well (the counter is more explicit about what it does).
Hardware/True bypass would of course be even better.
Yes hardware true bypass is always the end goal but for now I’m just wanting a simple way to bypass the fx while developing.
Will using a toggle with [r led1 @hv_param] work to toggle on/off an LED? Once I get that working I can use the same process for controlling a relay