LEMUR 2

[requires QLab 4.1]

Here’s another project using. LEMUR by liine.

If you are not familiar with using LEMUR with QLab, basic setup information is included in a previous chapter:

LEMUR

This project uses Lemur to Synchronise a fader bank on the iPad with the sliders in the selected cue in QLab. It also displays the number and name of the current cue.

It exploits one of the advantages LEMUR has over some other iPad OSC apps, its internal clocks.  This means that the app can regularly send an OSC message to QLab triggering a cue that gets QLab to send the specific information we need for our synchronization as standard OSC messages, avoiding the use of JSON strings

Here’s it is  in action (Best Viewed full screen):

If you have not already done so  I recommend a quick skim of the Lemur manual and watching a few of the manufacturers tutorial videos here

Here is the QLab workspace we are going to control.

Lemur2DemoQLab

The workspace contains the main cue list with 3 cues in a fire all group

Each cue is an 8 track wav file of an instrument with repeated notes. Each of  8 notes of the C major Scale C-C are on separate tracks.

Connecting your Mac to LEMUR

Open Lemur Editor on the Mac and Lemur on your tablet

Lemur EditorScreenSnapz001

Open a new document in Lemur Editor and set the document size to iPad (or the size of your device) using the pop up menu in the top right of the editor window

Click the play arrow in the top right to get a list of available devices running Lemur

Lemur EditorScreenSnapz002

Select the iPad you want to sync to and connect.

Click on the Lemur synchro icon next to the connect icon in the top right.

You are now synchronized.

Connecting LEMUR  to QLab

From the gearwheel menu in the top left of Lemur on your tablet select more settings.

Reflector 2ScreenSnapz001

In OSC targets connect OSC 0 to your Mac running QLab by typing it’s IP address into  the host field  and typing 53000 (QLabs OSC receive port) into the Port field Then Click Done

LEMUR Faders

First, we will create 9 faders, (Master and cue outputs 1-8), and set them up to send OSC messages to control the QLab level sliders of the selected cue.

To create the first fader, which will be the master.

In Lemur Editor on the Mac; Drag a fader object from the palette to the right of the Lemur work area.

 

So things don’t get confusing we’ll make the faders in Lemur have the same numbers as the sliders in QLab.

In the properties tab, of the properties pane, in the bottom left of the Lemur Editor, change the name to

Fader0

In the mapping pane, top left of Lemur Editor window, check the custom address and set the address to the QLab message for setting sliderLevel 0, (the Master)

/cue/selected/sliderLevel/0

Tick the scale checkbox and enter -60  and 12 for the min and max values for the fader object.

Fader0

We can place a monitor object beneath the fader to label it M. (Select the monitor object and type M into the Name Field in the properties pane at the bottom left of the Lemur Editor.

The monitor just uses the raw values of the fader so we need to scale them to match the Fader scaling we set.

range(Fader0.x,-60,12)

This tells Lemur to scale the raw 0.0 to 1.0 fader x output to a range of -60 to +12.

Set the units to dB

Set the Precision to 1

Set the font to 16pt

We can now copy and paste this fader object (and monitor object) 8 times to make the 9 faders we need.

We need to edit the name and custom address for each of these faders so the OSC sets the correct slider in QLab. e.g.

name: Fader1

custom address:  /cue/selected/sliderLevel/1

We also need to edit the fader’s monitor object name and value to match the Fader name. There is a quirk in LEMUR which will not allow a name to start with a number. so use F1

name: F1

range(Fader1.x,-60,12)

and so on, for faders 2 to 8.

faders

We can now test the LEMUR remote by selecting an audio cue in QLab and checking that moving a fader in LEMUR moves the corresponding slider in the selected QLab cue.

LEMUR Fields for Current Cues

So we can check on the remote the cue number and name of the currently selected cue in QLab, add 2 text fields. Name them TextQ and TextT

Select the object TextQ in the project pane and click the script icon at the bottom of the pane. Name the script

setcontent(OSC_ARGS)

Set the Execution of the script in the script pane to:

On OSC

and the script to:

setattribute(TextQ, ‘content’, OSC_ARGS);

This tells LEMUR to set the content of the Text Object named  TextQ  to the value of the OSC arguments every time the message /TextQ/setcontent is received.

Create another script for the TextT text object again named setcontent(OSC_ARGS).

The script for this is

setattribute(TextT, ‘content’, OSC_ARGS);

Text

BI Directional Control.

We need to get QLab to regularly report the sliderLevels of the currently selected cue, together with its cue number and name, so that LEMUR can follow changes in the selected cues and any level changes performed in QLab itself.

In order for QLab to communicate with the iPad running LEMUR we have to create a path in settings/network

Name a patch Lemur set the destination address to the network address of your iPad and the port to Lemurs default receive port (8000)

Lemur Patch

In QLab create a new cue list and name it OSC.

Create a fire all group cue in this list and number it SYNC

Create  a network cue, set it’s destination to Lemur, and set it to send the OSC message

/cue/selected/sliderLevel 0 #/cue/selected/sliderLevel 0#

This uses an OSC query (the bit between the hashes) to get the level of slider 0 (Master) in the currently selected cue and sends that as the argument to the OSC message /cue/selected/sliderLevel 0 which will set the LEMUR fader with that address i.e Fader0

Copy the cue 8 times to create Network cues for the other 8 LEMUR faders editing the OSC message appropriately e.g for Fader 1 sliderLevel 1

/cue/selected/sliderLevel 1 #/cue/selected/sliderLevel 1# etc.

2 further network cues are required to send the cue number and name to the objects in LEMUR.

The OSC message for the network cue that sends the currently selected cue number is:

/TextQ/setcontent “#/cue/selected/number#”

and for the cue name

/TextT/setcontent “#/cue/selected/number#”

Note the quote marks around the OSC query. This allows spaces in the result of the query to be sent to Lemur. If you omit them, then only the first word of the cue name is sent.

SYNCcue

 

We now need to set up the mechanism to fire the group cue SYNC in QLab a few times a second to send that info to LEMUR. We could create a loop within QLab to do this or a network cue with duration with a start message. This would work well until the ESC key, or a panic was triggered in QLab, which would stop this from running. In this case, it’s far better if the cue is started a few times a second from LEMUR. Because LEMUR has internal clocks this is quite straightforward to arrange and is a big advantage to using LEMUR instead of TOUCH OSC for bidirectional remote control.

LEMUR CLOCKS

To start a clock when a LEMUR project opens we need a script at Project Level

In the Project Pane highlight the Project folder and click the script icon

name the script start clock, set its execution to On Load, and its script to:

clock_start(0);

which starts LEMUR’s clock numbered 0 at its default BPM of 120.

startclock

Create another script at project level named sync

Set it’s execution to:

On Clock   Clock 0  On ⅛ note

This will cause it to execute the script 16 times a second (8 times a second at 120bpm for quarter notes= 16 times a second for ⅛ notes)

The script is

oscout(0,’/cue/SYNC/start’,1);

Which sends the OSC message  /cue/SYNC/start 1 to QLab. The first parameter of the message is LEMURS patch number to send to QLab and the 3rd parameter is an argument for the message that LEMUR insists you send, but QLab is clever enough to ignore.

SYNCcue

Because there may be times when we don’t want to deal with the overhead of constant OSC messages being sent from QLab to LEMUR many times a second, drag a custom button into the Lemur workspace.

Name it SYNC and set its color on to green and its style for both states, off and on to the play symbol.

Change the script named sync() to this

if(SYNC.x==1)oscout(0,’/cue/SYNC/start’,1);

This means the message to trigger QLab to send feedback is only sent when the SYNC button is ON.

When Bidirectional SYNC is switched of it might be useful to have a button that manually updates LEMUR to the state of the currently selected cue in QLab.

Drag a custom button into the Lemur editor. Set it’s behaviour to PAD to give it a momentary action.

give it a custom address of  /cue/SYNC/start,  

change the execution to message sent when value goes from 0 to positive  (symbol to right of custom address field),

and set its  Style On and Style Off to the text GET

 

LemuriPad

The example QLab workspace, together with the LEMUR file  can be downloaded for QLab 4 here

Chapter Author: Mic Pool

Chapter Graphic: modified from an original photograph © Francis C. Franklin
licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License R
edistributed under the same license.
Creative Commons License

MenuGraphic