Forums > MaxMSP

Wrapping my head around logic

October 29, 2010 | 8:39 pm

I’m currently using a monome and wanted to use the == object to receive the state of the matrix (for example, 4 0) then send a bang to a midi note. Thing is I can’t get the output into == in a list. It keeps receiving just 4 thus == never outputs a bang. I’m still new to Max (and any programming at all) and have gone through the tutorials and I still refer back and forth.I tried reading the if reference and still can’t wrap my head around it. Maybe someone can show me a better instruction set for my situation? Any help at all will be appreciated.

thanks


October 29, 2010 | 8:51 pm

to compare lists try [zl] … there are various ways how to implement it.

you could also unpack the list and then compare both values in one function
in [expr] or [if]:

[unpack 0 0]
[if $i1==0 && $i2==4 then bang]

when bang is going to be a dynamic note number, i would feed the notenumber
also into the [if], as third operator:

[unpack 0 0]
[if $i1==0 && $i2==4 then $i3]

-110


October 30, 2010 | 3:34 am

Thank you for clearing that up. After reading what you posted then reading over the reference file it all makes sense. Thanks! I’ll be checking out the zl object also.

best


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