So this week I have been messing on and off with OSC and iPads to see how far I could get with it.
My aim was to get a full bidirectional remote control. I envisaged having a control with perhaps 20 custom controllers per screen, including buttons and faders and to get these working with full bidirectional feedback so anything relevant to those controls that was done on the mac would be visible on the iPad and vice versa.
First the bad news. I tried to do this with Touch OSC but it became apparent that without the promised scripting ability, it was going to be very difficult to get bidirectional control.
LEMUR is far deeper and has a much steeper learning curve, but can do just about anything (except send OSC messages without arguments). I decided to concentrate on this.
I've attached the fruits of a few days experimenting. This project lacks a lot of error checking and is more a proof of concept than a practical example, but I managed to get all the important bits working.
(See screenshot)
In this example you put a load of audio files into the bundled audio folder. Press Key 1 and up to the first 16 audio files are loaded into 16 cues in Qlab automatically.
As they are loading 16 buttons on LEMUR on the iPad are instantly labelled with the titles of the cues.
The LEMUR then acts as a simple jingle style remote. Press a button to start that cue. Press again to stop.
Any cues that are started or stopped on Qlab will echo on their button on the iPad and if you ESC on Qlab all the buttons on the iPad indicate this
The fader is more a proof of concept than a sensible application. It is automatically assigned to the highest number button that is playing. It displays the current master level for that cue from Qlab and will then controls that level. Again if you make changes to the currently selected fader in Qlab the fader on the iPad will move as well.
I think there's enough in this example for those happy with some involved scripting to modify this to create a whole range of custom remote panels with full bidirectional control.
To use the attached:
Copy a dozen or so audio files into the audio folder.
Install the LEMUR .jzml file onto your iPad using LEMUR editor on the mac.
SET IP address of Mac in LEMUR OSC1 setting
Open Qlab workspace
Patch your audio device
Set IP address of LEMUR ipad in Qlab OSC 2 setting
Press 1 to Sync.
Loads up to first 16 files in 'audio' folder, sorted by name.
Labels 16 Buttons on LEMUR with cue titles
LEMUR Fader controls highest number pad in use.
Feel free to contact me off list for any detailed technical questions.
Now back to the OSCARS.
Mic
tell front workspace
-- Establish the path to the current workspace
set workspacepath to pathif workspacepath is missing value thendisplay dialog "The current workspace has not yet been saved anywhere." with title dialogTitle ¬with icon 0 buttons {"OK"} default button "OK" giving up after 5returnend if
-- Get the path that should prefix all media file paths
tell application "System Events"set sharedPath to path of container of file workspacepathend tell
end tell
tell application "System Events"set theContainer to path of container of currentFileTargetset theExtension to name extension of currentFileTargetif theExtension is "" thenset theName to name of currentFileTargetelseset theFullName to name of currentFileTargetset theName to text 1 through (-1 - (length of theExtension)) of theFullNameend ifend tell
set audioFileTypes to {"com.apple.coreaudio-format", "com.microsoft.waveform-audio", ¬"public.aifc-audio", "public.aiff-audio", "public.audio", "public.mp3", "public.mpeg-4-audio"}(* This list deliberately excludes "com.apple.protected-mpeg-4-audio" to protect against old DRM-restricted iTunes files *)tell application "System Events"set audioFilePaths to {}set folderFiles to files of folder (sharedPath & "audio") whose visible is truerepeat with eachFile in folderFilesif type identifier of eachFile is in audioFileTypes thenset end of audioFilePaths to path of eachFileend ifend repeatend tell
$ curl -O https://gitorious.org/pyosc/devel/archive/633c0112318a3519314aa798a552a092566c73c1.tar.gz
$ cd ~/Downloads/
$ open "633c0112318a3519314aa798a552a092566c73c1.tar.gz"
$ cd pyosc-devel
$ sudo python setup.py install
* You'll need to enter your password here *