Forums > MaxMSP

global [pvar]

August 1, 2011 | 3:11 am

is there a global way to directly access values via scripting name like you can do with [pvar]?


August 1, 2011 | 8:11 pm

nothing? or just a stupid question?


August 2, 2011 | 1:08 am

If you haven’t already done so, check out the objects in the "See Also" popup menu in the pvar help file.


August 2, 2011 | 1:29 am

there is only [send/receive] and [value], but the unique thing about [pvar] is that it can be scripted directly.


August 2, 2011 | 2:26 am

you can use the [pattr] system, scripting messages to [thispatcher], or access/set them using javascript…depends on what you want to do and how you want to organize things. [thispatcher] is only for a given patch window so it’s not global, but [pattr] can be made global.


August 2, 2011 | 2:38 am

ok thanks, but i´m a bit sceptic about [pattr] in the speed aspect, as once running it seems to organize very much.

javascript may be an option, i used it only for some iterations and derefer-routines (means send the script variables and get variables back from it). is it possible to really adress existing objects (i know you can place new ones), set them into relation and and set their values from inside javascript?


August 2, 2011 | 2:49 am

I think so, seems like it can do pretty much anything you want…though I don’t use it much in Max.


August 2, 2011 | 2:52 am

hm ok, thank you. i see there is stuff like "maxobj" to communicate labeled objects. thats promising ;)

i´ll take a closer watch when my time gives it.


August 2, 2011 | 3:31 am

i’m researching the same subject..

one solution i’m using now is javascript / pvar, which makes a lot of stuff easier..

another very interesting solution is the FTM library, with FTM you can actually create variables and expressions as exactly as you said ( ;

before using FTM in all my patches i will try it a little bit more, any suggestions in this matter are more than welcome.

also i’m attaching a snippet i made using FTM. hope it helps you ( ;

Attachments:
  1. ftm.var.maxpat

August 2, 2011 | 3:49 am

ftm… the Max learning story never ends ;)

looks interesting indeed. A little bit I do hope that Code-Gen in Max 6 simplifies variable access as well.


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