Page 1 of 1

Posted: 30 Mar 2014, 05:36
by niggles
Hi,

Am a bit stuck trying to toggle between 2 sets of a data for an input.

I would like to use a switch which either:

* sends a specific value (constant) to a knob when the switch changes from 0 => 1

* allows the knob to act as normal when the switch changes from 1 => 0

In the uploaded patch, it always seems to be sending the constant value. So I guess I'm trying to write an "if" statement, but not really sure how to achieve it.

Thanks,
Niggles

Posted: 30 Mar 2014, 10:44
by nay-seven
maybe i misunderstood, but to resume
if switch On the knob is the master, if OFF a constant is used..?
so here a way:
Download

Posted: 30 Mar 2014, 11:12
by niggles
I tried your patch but clicking the knob doesn't seem to send a new value - the wet fader stays the same.

Posted: 30 Mar 2014, 11:54
by nay-seven
yes, but the formant wet value is updated

now, if you want the knob be updated too, you have to link it this way
Download

Posted: 30 Mar 2014, 13:09
by niggles
Excellent - thanks!

I will use this for other times I need write:

if(foo == bar){
// do something
} else {
// do something else
}

Sorry if this was a basic question, but I tried many things - some of these "logic" loops are not so obvious in Usine - but once an example has been given it should be easy.