Forums > MaxMSP

How to programatically retrieve values?

July 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,
Squimbelly


July 29, 2013 | 12:17 am

No patch was attached…

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


July 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:

<code>

– Pasted Max Patch, click to expand. –

</code>

Thank you again,
S.T.


July 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. –

August 5, 2013 | 7:23 pm

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

S.T.


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