How to programatically retrieve values?

    Jul 28 2013 | 11: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

    • Jul 29 2013 | 7:17 am
      No patch was attached...
      Use "copy compress" from the edit menu in Max and paste into your post.
    • Aug 01 2013 | 1:07 am
      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:
      Thank you again, S.T.
    • Aug 01 2013 | 4:51 am
      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.
    • Aug 06 2013 | 2:23 am
      Thank you very much Metamax - I've just learned alot!