About to wire up a 16 x 5 grid of objects - can scripting and thispatcher help?

    Jul 02 2012 | 11:19 am
    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 16x5 - 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 think scripting with thispatcher should be able to help me line them all up separately, give each object it's own arguments, and connect them all up. Are there any tutorials or examples you would recommend? I've searched but I mostly find javascript examples.
    I don't speak java script.
    Any pointers appreciated!!

    • Jul 02 2012 | 5:52 pm
      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
    • Jul 02 2012 | 9:31 pm
      Thanks Nate! but I think I should be able to do it without js right? by just using the scripting commands in thispatcher?
    • Jul 02 2012 | 11:05 pm
      Yes that should work. Make sure you have checked out the subpatches in thispatcher's helpfile if you haven't already.
      Good luck!
    • Jul 02 2012 | 11:14 pm
      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)
      Or is everybody using javascript?
    • Jul 03 2012 | 3:38 am
      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.
    • Jul 03 2012 | 2:12 pm
      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!) Cheers Roger
    • Jul 04 2012 | 2:02 am
      Max Toolbox!! I was 100% unaware - thanks so much seejayjames and Roger!
      I"m on it :-)
    • Jul 04 2012 | 2:50 am
      wow. it's incredible. so simple to use and such a time saver.