I built a patch which allows you to control any parameter in Ableton (through Max for Live) through the brightness of the webcam. It’s borrows sections of code from other patches, some of which is crazily complicated and difficult to follow, but I thought I’d pop it up in case anyone’s interested. It’s good for adding a bit of randomness to sets, and if you’re playing at venues with lighting rigs, you get a bit of a link between the lighting and the sounds, which is pretty cool/geeky.
The patch
There’s a video over on my video page which shows me playing my track Loud Cloud using the patch.

The final patch shown below has been divided into two sections so it’s a bit easier to read, the left left side of the patch relates to Jitter and the determining of the modulation value (including the refresh rate of the Jitter matrix and the scaling). The right side relates to the parameter grabbing from Live and the actual assignment of the value from the left side.

The video side (grabbing parameter values)
The Jitter/modulating (left) side of the patch works through the jit.dx.grab and jit.qt.grab objects in Windows and Quicktime respectively. It’s selectable through a gswitch2 object so that you can use the patch on OS X or Windows without installing extra weird video stuff.
When it’s been activated, the Jitter objects are banged to output the matrix. The spacing between these bangs is either a bar, a beat or a user specified length of time (in seconds). The metro object with specified parameters combined with a transport object (this links the patch to the tempo in Live) outputs bangs every beat or every bar, depending on the outlet.
A bit of a tip if anyone else is going to build anything similar, the user selectable time refresh for the video works through the qmetro object. Qmetro is used in preference to metro as the metro object can drop frames because it’s a low priority execution in Max.
The output of the Jitter grab is run through a small subpatch which converts the matrix from RGB to monochrome (with the jit.rgb2luma object) before outputting the mean brightness with the jit.3m object.
The output of the brightness subpatch is run through a function object. This object allows the user to draw their own transfer function allowing the control signal to adapted as necessary. The boundaries of this object are controlled in the inspector. This object handles scaling and control of the modulation parameter.
The assignment side
The assignment side of the patch works through a range of variety of subpatches. The GetAllTracksIds subpatch sets the live.path to the set, feeding this information to the live.object, which outputs a list of the tracks in that set.
This information is then fed into the GetAllDevices subpatch which detects any devices used in the aforementioned tracks. Once the appropriate device is selected in the umenu, the parameters of the device are determined through the GetParameterNames subpatch. The live.remote is the final object on this side of the patch. The path of the relevant parameter is set, allowing the value from the left side of the patch to control the relevant parameter. This side of the patch is heavily based on the patch OnsetDetection by Zlatko Baracskai.
Sharing’s caring!
If anyone’s interested in seeing the code or using the patch then give me a shout through the interrogation link and I’ll send you a copy. Also, if anyone’s got any lovely patches for me that they think I’ll find interesting (especially interested in glitch) then I’d really appreciate it if you fancy sharing your code!
laWrence
I’m very much looking forward to studying this again next year at uni.
Especially as Lawrence (who was in my classes last year), just posted his final assessment for me to steal.