querying min and max values for patterized objects

May 31, 2011 at 10:42am

querying min and max values for patterized objects

Hello maxers

I’m currently trying to implement a midi learn feature in my synth, but does anybody knows if there’s a message you can send to pattrstorage to retrieve the min and max values (if any) allowed for a patterized object ?

This is for automatic scaling of incoming midi cc data accordingly…

thanks in advance for your reply(ies)

ph

#57364
May 31, 2011 at 11:09am

In general, you can send the following to pattrstorage:

getX::attributename

This will retrieve the value of the named attribute for the client with scripting name “X”

More specifically, to retrieve the value of the ‘min’ attribute (the attribute may possibly be called “minimum”, i’m not a max computer to check) of, say, a number box with the scripting name MyNumberBox, the message you want would be:

getMyNumberBox::min

#205567
May 31, 2011 at 11:42am

works perfectly, thanks !

#205568
May 31, 2011 at 12:00pm

It may also be useful to know that a pattr object can bind to a given object attribute, allowing you to remotely get/set that attribute:

e.g. [pattr @name myPattrObject @bindo clientX::attributeName]

#205569

You must be logged in to reply to this topic.