The second function in my "Making Max JS less crap" series, this function scans all objects in the patch and all subpatches and returns a reference to the object with the specified scripting name: It's basically a lazy man's version of my dollar function which means you dont need to give every patcher a scripting name. The downside is it (probably) runs a bit slower. Enjoy!
Showing posts with label Max/MSP. Show all posts
Showing posts with label Max/MSP. Show all posts
14 March 2011
Max/MSP Javascript "find object" - lazy dollar function
Continue Reading >
Labels:
functions,
Javascript,
js,
Max,
Max/MSP
Max/MSP Javascript: Dollar Function - Returns a reference to a Max Object in a patch/subpatch
I started using Max this month and was simultaneously impressed with its power and simplicity and frustrated by it's cumbersome interface. I quickly checked out it's javascript capabilities and became much more comfortable. JS allows you do simple operations quite quickly that would take a tonne of parsing objects which use up space and lead to a messy patch.
That said, JS in Max is really a slightly ugly cousin of browser based javascript. Calls to objects are long winded and basically everything is a bit head wrecking!
So here we go: the first in my "Making Max JS less crap" series... The infamous dollar function! All you need to do to access a max object is give the object a scripting name in the inspector* and then use: $('scriptingname')
Continue Reading >
That said, JS in Max is really a slightly ugly cousin of browser based javascript. Calls to objects are long winded and basically everything is a bit head wrecking!
So here we go: the first in my "Making Max JS less crap" series... The infamous dollar function! All you need to do to access a max object is give the object a scripting name in the inspector* and then use: $('scriptingname')
Labels:
functions,
Javascript,
js,
Max,
Max/MSP
Subscribe to:
Posts (Atom)