In the last couple of years, two ingenious pieces of software — Camille Troillard’s OSCulator and Hexler’s TouchOSC — have had a tremendous influence on the way musicians, composers and performers can interact with computers. Gone are the days of dedicated hardware controllers, which always seem to either have flimsy knobs, not enough pixels on their LCDs or two or three faders less than the amount you’d be comfortable with (when they don’t, they cost a couple of thousands of dollars). As with any new and experimental technology, the whole thing is in active development and many concepts are either hard to grasp or difficult to implement. Surprisingly, most of the stuff you’re likely to need is already working perfectly well and very easy to set up.
If you’ve never tried any of this fancy OSC stuff, please have a look at the official OSCulator and TouchOSC documentation (which are pretty basic and incomplete at this stage). Then experiment with some of your own inventions. Then come back.
One of the difficult things to handle, for me at least, has been bidirectional communication between the interface (TouchOSC) and the sound generator (Logic Pro, in my case). Translating OSC events from TouchOSC to MIDI messages that Logic Pro can understand is fairly easy, thanks to OSCulator. However, getting things such as toggle buttons to work properly and reliably is something that has proven to be somewhat intellectually challenging (in a relative way, of course). I was therefore quite happy when I discovered I could find still another use for an iPhone, iPod Touch or – better still – iPad: a fully-functional recording light. You’ve seen it all over the place: the kind of luminescent fixture which says “ON AIR” or “RECORDING” or something to that effect, and which essentially warns the person about to open the door to the studio that the tape (or what’s left of it these days) is currently running. This tutorial will show how you can turn your $200-$700 iOS device into a recording light, saving you at least $111 in the process (and helping you show your clientèle how hip, classy or frivolous you are by hanging iPads and iPhones all over your studio).
I’d also like to point out that TouchOSC is $4,99 and OSCulator is around $20. Plus you get to pick up your recording light at the end of the day to check your mail.
Start by designing your recording light. With the free TouchOSC Editor, this is easy. I named the page “RecordingLight”, added a couple of Toggle Buttons (called, surprisingly, “toggle1″ and “toggle2″ in my setup). They won’t be used for input — obviously the recording light will be protected behind a glass fixture. I’ve also created a “Label V” object which will, soon enough, hold a “RECORDING” text string (it’s a V object rather than an H because the entire Layout Orientation is horizontal, a quirk which should someday be fixed). The label’s text size has been set to 70, but the text string itself is empty, so that nothing is displayed unless recording is taking place. Upload the TouchOSC file into the iOS device as usual.
Now, in Logic Pro, add a Recording Light control surface device (Logic Pro > Preferences > Control Surfaces > Setup…, then go through New > Install > (other) Recording Light). Set the device’s Out Port to “OSCulator In (8000)” (presuming you’re using the defaults) and the Input to “OSCulator Out”. This makes sure the device’s bidirectional communication is going through OSCulator.
With this basic setup out of the way, start recording in Logic. If everything is working properly, OSCulator will add a new event based on what it received from Logic. It should be something akin to “/midi/note/2″ with three parameters (pitch, velocity and trigger). Click on “0: pitch” and select Edit > Demux. Then start recording in Logic again. The event in OSCulator will change to the specific note sent by the Recording Light device: “/midi/note/2 > 25″.
If you’d like to know what’s happening in more detail, use Kurt Revis’ excellent (and free) MIDI Monitor software. This will show you that the “Recording Light” control surface in Logic simply sends a C#0 Note On message when recording, and a corresponding Note Off message when recording stops.
Now we need to tell OSCulator to send these events to the two toggle buttons we’ve created in TouchOSC so that they light up at the proper time. On the “1: trigger” line, select the Event Type “OSC Routing”. This means we’ll be translating the MIDI event into a custom address (or destination). Under “Value” select New and create a new Rewrite address called “/RecordingLight/toggle1″ (remember, this is the name we gave to the first toggle button in TouchOSC). Then duplicate the “1: trigger” event by pressing Command-D. This allows us to send the trigger to another control, the “toggle2″ button. Under “Value”, select New and add a Rewrite address called “/RecordingLight/toggle2″. The toggle buttons in TouchOSC will automatically react properly to Note On and Note Off messages.
Finally, when recording takes place, we’d want the (initially) empty label we created to say “RECORDING”. This should be replaced by an empty string when recording stops and needs to be set up manually. The two different message rewrites will be defined using an option in OSCulator’s Route Editor. Duplicate the “1: trigger” once more and set its Rewrite address to “/RecordingLight/label1″. Double-click on the “Arguments” cell, delete everything in the Arguments field that pops up and type RECORDING followed by a space. This will have the effect of setting the label1 control to the string “RECORDING” whenever recording in engaged in Logic. At the bottom of the window, set “Route when” to “The value goes from 0 to positive”.
Duplicate the “1: trigger” event one last time and set its Value to the new Rewrite address “/RecordingLight/label1″ with a new argument: Alt-Space (the only way I could figure out of sending an empty string to TouchOSC – it will look a bit funny in OSCulator but it works). Set the options to Route when “The value goes from positive to 0″. This will make sure the empty string is set when recording is stopped.
The above setup works flawlessly in Logic. The on/off states of the recording look like this, assuming you’ve hanged your iOS device somewhere in sight:
This is a pretty basic application of using TouchOSC to fake an “official” control surface in Logic. I was trying to do the same thing with more complex devices, hoping to remote control Logic with a customized interface. By that I mean, of course, proper bidirectional communication (such as getting Cycle, Metronome & Record buttons to stay lit and mirror the state of the sequencer, or displaying SMPTE timecode). Remote controlling Logic with simple one-way messages in TouchOSC is another story, is very easy to do and has been done many times.
The devices I’ve tried to analyze — Mackie Control, Logic Control, iControl and TranzPort — all proved difficult to emulate with the current state of OSCulator and TouchOSC documentation. Whether using SysEx or Continuous Controller events, the above devices’ messaging schemes are a pain to figure out and translate both ways properly (at least in the limited time I have for such experiments). If anyone cares to study further I’d be glad to hear about it.