Forums > MaxMSP

Math with MIDI controller parameters

June 8, 2011 | 8:07 am

Hi, I’m new here.
I’m designing a patch with a lot of math calculations for control signals that come from a MIDI controller (knobs)
My problem is that when i make a simple expression like
expr $i1+$i2
the output olny updates its value when $i1 changes, but not when $i2 changes.
does anybody know a way to have an updated value at the output when any of the inputs changes?
Thanks!!!


June 8, 2011 | 8:28 am

The [pak] object will help. Also I’d recommend using straight math operators if you only need one of them in your equation, for example use [-] rather than [expr $i1-$i2]. Here’s a patch:

– Pasted Max Patch, click to expand. –

June 8, 2011 | 9:41 am

Thanks luke!!
i’m sorry to ask this but, how can I use the code you posted to create a maxpat file?


June 8, 2011 | 9:49 am

You should read this thread (it’s a bit hidden):

http://cycling74.com/forums/topic.php?id=26095


June 8, 2011 | 10:16 am

thank you guys!!
it’s amazing how well this community works


June 8, 2011 | 12:21 pm

 
5       7
|        |
|     [t b i]
|  /          |
[expr $i1-$i2]
 |


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