Forums > MaxMSP

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

April 1, 2013 | 11:42 pm

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

– Pasted Max Patch, click to expand. –

April 2, 2013 | 1:52 am
– Pasted Max Patch, click to expand. –

April 2, 2013 | 2:12 am

thank you!


April 2, 2013 | 4:27 am

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!

– Pasted Max Patch, click to expand. –

April 2, 2013 | 7:49 am

Hey Mikee,

Think this does what you ask,

All the best,

Oli

– Pasted Max Patch, click to expand. –

Viewing 5 posts - 1 through 5 (of 5 total)