Archive for July 5th, 2008

05
Jul
08

Very Useful Things: Structs, Spooky Patch

I know I’ve mentioned structures before, but using a simple chunk of JavaScript to roll a load of controls into a single structure is a great way of mitigating cable spaghetti.

In the example above, I’ve connected the struct, to a Kineme Spooky Send patch, which can be used to eliminate cabling between macros completely, allowing you to ‘wirelessly’ transmit any kind of information QC can deal with (including structures) from any part of a QTZ to any other part. It even works between separate QTZs embedded in the same application, apparently.

This is a very useful too for ‘modularising’ your QTZs. For example, I’m currently working on a generalised set of macros for creating the ‘pseudospreads’ compositions. I’ve used Spooky Send and Receive patches to send control values between the macro containing the controls of the mesh instances and the one containing the meshes themselves. I’ve also added range ports to the control macro, so it can be tweaked to fit different surface formulas.

Incidentally, the eagle-eyed may have spotted that the order of items in the structure pictured above is pretty random. This is a potentially very annoying feature of structs created with JavaScript (an maybe generally, I’m not sure). Fortunately, it’s quite easy to use the Structure Sort patch to sort them into the correct order. In this case, though, it’s not really necessary, as I’m using the item key (name) to extract the relevant value anyway.