Welcome to %s forums

BrainModular Users Forum

Login Register

Toggle input data values

I need help on a Patch
Post Reply
niggles
Member
Posts: 32
Location: Melbourne Australia
Contact:

Unread post by niggles » 30 Mar 2014, 05:36

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
Digital Director & Programmer by Day | Musician By Night
iMac Core I7 | Usine | Logic | Leap Motion (loving it)
http://www.tribe404.com

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 30 Mar 2014, 10:44

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

niggles
Member
Posts: 32
Location: Melbourne Australia
Contact:

Unread post by niggles » 30 Mar 2014, 11:12

I tried your patch but clicking the knob doesn't seem to send a new value - the wet fader stays the same.
Digital Director & Programmer by Day | Musician By Night
iMac Core I7 | Usine | Logic | Leap Motion (loving it)
http://www.tribe404.com

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 30 Mar 2014, 11:54

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

niggles
Member
Posts: 32
Location: Melbourne Australia
Contact:

Unread post by niggles » 30 Mar 2014, 13:09

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.
Digital Director & Programmer by Day | Musician By Night
iMac Core I7 | Usine | Logic | Leap Motion (loving it)
http://www.tribe404.com

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests