global [pvar]

Aug 1, 2011 at 3:11am

global [pvar]

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

#58280
Aug 1, 2011 at 8:11pm

nothing? or just a stupid question?

#209365
Aug 2, 2011 at 1:08am

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

#209366
Aug 2, 2011 at 1:29am

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

#209367
Aug 2, 2011 at 2:26am

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.

#209368
Aug 2, 2011 at 2:38am

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?

#209369
Aug 2, 2011 at 2:49am

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

#209370
Aug 2, 2011 at 2:52am

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.

#209371
Aug 2, 2011 at 3:31am

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
#209372
Aug 2, 2011 at 3:49am

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.

#209373

You must be logged in to reply to this topic.