Forums > MaxMSP

How to programatically retrieve values?

Jul 28 2013 | 4:51 pm

Hello Folks;

I’m new to Max/MSP and have a question: If I store a value in a pattr object, how do I programatically retrieve that value? My initial attempt:

#pattr _numMidiValue (initialized to 60)
#if $i1 == get_numMidiValue then…

Unfortunately, the ‘get_numMidiValue’ call is not getting evaluated. How does one programatically retrieve such values in Max? I’ve attached my test patch for your examination.

Thank you,

Jul 29 2013 | 12:17 am

No patch was attached…

Use "copy compress" from the edit menu in Max and paste into your post.

Jul 31 2013 | 6:07 pm

Hello Metamax;

Ugh – somehow my .maxpat did not make it to the forum. But thank you for the tip on "Copy Compressed"!

Here’s the example patch:

-- Pasted Max Patch, click to expand. --


Thank you again,

Jul 31 2013 | 9:51 pm

Check out the reference on pattr (ctrl/right click the object and select reference).

You can bind pattr to other objects either with @bindto as an attribute or by linking the middle outlet of pattr to the object.

Once you have pattr bound to a number box, it’s just a matter of comparing two numbers. [sel] outputs a bang when values match. [zl reg] stores a value and waits for a bang to output.

Like mashed potatoes and gravy.

— Pasted Max Patch, click to expand. —
Aug 05 2013 | 7:23 pm

Thank you very much Metamax – I’ve just learned alot!


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

Forums > MaxMSP