Scripting: read values from objects

May 1, 2006 at 8:16pm

Scripting: read values from objects

Hi all,
I am quite new to max/msp and wondering it’s possbile to read values from objects, such as number boxes etc?

I know that you can “send” an interger to a number (script send *objectname* *value*), but i’ve been searching for the last few hours and can’t find a way of doing it – though im guessing using javascript it’s possible?

Cheers all,
Dom

ps – have done a quick search of the forums, sorry if i have missed a post about it though!

#25739
May 1, 2006 at 8:26pm

The objects you are looking for are autopattr and pattrstorage, it will fetch the data from all your boxes etc then store them. you can also save the data as txt. You can also store the data and recall it- which allows interpolation.
Hope this is what your after
Trum

#76138
May 2, 2006 at 4:33pm

I think i just asked a similar question in the javascript forum. Is there a way to get the value within the js object with out having to run laps to and fro the patcher (ie with pattr)? Something similar to supercolliders blah = mySliders.value; (I understand that max and supercollider are very different in nature but you could still coax out the values by specifying which inlet and outlet you want the data from)

#76139
May 2, 2006 at 6:54pm

well “script send bang” will evaluate … :)

#76140
May 2, 2006 at 7:04pm

But is there a way to skip the outlet bit so it grabs the value directly in java script with no send/recieve, forward, or patch cable bits?

I think I’m getting at the class itself (not sure if its the object or the class) because when i do .maxclass it returns “a number” but is there a property that i can access to get that number (or a list from a multislider)?

#76141

You must be logged in to reply to this topic.