About to wire up a 16 x 5 grid of objects – can scripting and thispatcher help?
Hi all, I’ve nicely packaged up an abstraction that takes a few inputs, and has an output which sets a simple image (it’s for a user interface)
I’ll need it in a grid of 16×5 – each object will have a few common inputs, ouptut to it’s own image but also output to a common outlet so I can pass on all the data for a remote display.
I don’t speak java script.
Any pointers appreciated!!
I would definitely recommend carefully going through Max JS Tutorial 1 (to get familiar with the syntax etc.) and then doing the same with Max JS Tutorial 2. If I correctly understand what you are trying to do, the second tutorial should introduce you to the concepts needed to make it work.
Hope this helps
Thanks Nate! but I think I should be able to do it without js right? by just using the scripting commands in thispatcher?
Yes that should work. Make sure you have checked out the subpatches in thispatcher’s helpfile if you haven’t already.
Thanks! I did check those out but it’s very limited information if you want to do more than just create an object an move it around a bit… I was hoping for a tutorial on this (creating object and connecting them through scripting in thispatcher)
It can be a tossup when considering scripting, yes it can handle all the creation and connections automagically, but figuring out the syntax and the object offsets can sometimes take much longer than just doing it manually. This is especially true if you use MaxToolbox which makes most of these connections take seconds rather than minutes…also depending on how things are set up, copy-paste may include a lot of the connections already.
But about your question, yes, you should be able to do everything with [thispatcher] rather than [js]. Look also to [sprintf] which will probably help format the exact command syntax with offsets etc.
I think scripting for this kind of thing is only really worth the effort if you’re patching something that will change dynamically or if it’s a really huge patch, otherwise Max Toolbox is definitely your friend, along with encapsulation and paste-replacing.
If you’re really desperate for an example, you could have a look at my Evil Tonelab project, which uses scripting to load and connect a gird of bpatchers.
It’s a bit over-complicated because the modules are split into two parts, the bpatcher GUI and a ‘core’ loaded into Alex Harker’s dynamicdsp~ object, but most of the scripting can be found in a couple of sub-patchers, [p bpchanger] and [p connector], which are in turn in a sub-patch called [p bphandling.gen].
(Ironically Max 6 came out when I was half way through building this, and the new audio engine pretty much makes the whole dynamicdsp~ bit redundant, so I’m now having to re-build the thing without this extra complication!)
Max Toolbox!! I was 100% unaware – thanks so much seejayjames and Roger!
I"m on it :-)
wow. it’s incredible. so simple to use and such a time saver.