1 +2 +4 = ???? need help

take5's icon

Greetings I am trying to create a simple combination of switches that have simple values to be additive/subtractive to create a set of values to be sent out to a controller via CC.

There are 3 buttons to be used, each has value to be sent out. These values are 1, 2, 4 .

BUTTON 1 = 1
BUTTON 2 = 2
BUTTON 3 = 4

What I need is if button 1 is pressed it sends out a value of 1.
If button 1 & 2 are pressed, their values combined send out a message of 3.
If all buttons are pressed, it sends a value of 7.
(note: I will also need these to work in reverse, that if these buttons are pressed again they should subtract their value from the sum and send out a new value.

I have attached what is the beginning of what I have started, but need some help finishing it because I do not know how to make the switches. Once I have learned this, I will attempt to make another one with values 0-7

Any help would be gratefully appreciated.

Thank you

Max Patch
Copy patch and select New From Clipboard in Max.

Teb Geronimo's icon
Max Patch
Copy patch and select New From Clipboard in Max.
take5's icon

thank you!

take5's icon

while I am still new to this, I cant seem to figure this next part I was working on. Coudl anyone help me figure out how to make the first (unattached for now) button in this patch turn off both the next two buttons? I cant seem to figure out how to get the first button to send a value of 0

thanks for everyone's help so far!

Max Patch
Copy patch and select New From Clipboard in Max.

Oli Mason's icon

Hey Mikee,

Think this does what you ask,

All the best,

Max Patch
Copy patch and select New From Clipboard in Max.

Oli