Homepage > Documents > My Llife with Lemur the iPet

Liine Lemur app, Midi Controller GUI Design and Script Programming

My Llife with Lemur the iPet

Review of the Liine Lemur Midi/OSC controller. Application examples.


A short fairy-tale with 'Grimm' ending

Photograph of Euphonix MC Control device Once upon a time prince Cigol and his beloved Euphonia lived happily together, connecting smoothly while making music. Then stepmother Diva mobilized the Eucontrol army and went to war. Furious King Malus sent a poisoned apple that killed the princess. Her grave is guarded by a lonely lemur that howls during quiet nights.

Lemur Controller for NI Reaktor Monark synthesizer The real story: for years the Apple Logic DAW software and Euphonix (now Avid Artist Series) MC Control hardware component were advertised as a closely matched pair, working together smoothly. When the collaboration stopped, for users this meant unreliable connection (proprietary Eucontrol protocol) and regular, long repair sessions identifying and trying workarounds to keep the hardware control of Logic up and running (firmware, drivers, settings, etc). In my case, I gave up and the piece of gear is now gathering dust on a shelf. That was the trigger to invest time in learning the Liine Lemur app for Midi/OSC control, which is running on a general purpose iOS device, in this case an iPad tablet.

Lemur controller development on the iPad

Lemur Controller for NI Kontakt and Logic hammond organ instruments I appreciate the Liine Lemur product concept. It is a great tool for controller development. As a software programmer I embraced the scripting potential. Controller design and development can be completed within hours; adding controller features is easy. Within months I completed a set of around 25 controllers for several software instruments and plugins. Here is a category list with the main controller elements (usually under different tabs, see pictures):

  1. Logic Pro Instruments. After reading LPX manuals and opening the EXS24 editor for finding the Midi implementation tables, now there are controllers for the ES1 Synthesizer, EXS24 Orchestral Percussion, EXS24 Strings, EXS24 Timpani, and Vintage Electric Piano, with controls for instrument and articulation selection, filter and amplifier settings.
  2. NI Kontakt Instruments. Native Instruments Komplete components allow the user to assign Midi CC numbers to individual GUI elements (brilliant!). The controller collection includes Orchestral Percussion, VSL Strings, Timpani, B3 Tonewheel Organ, MM Scarbee Bass, Acoustic Strummed Guitar, and Scarbee Funk Guitarist. This includes control of articulation selection, instrument and amplifier settings. For the guitars there are also string and fret position, chord and strumming pattern selectors.
  3. NI Reaktor Ensembles. The Lemur controllers were developed after assigning full Midi CC control to the Ensemble GUI. An alternative implementation could be based on OSC (but requires WiFi connection). I have completed control of the settings in the Monark, Travelizer, Subharmonic and Space Drone ensembles.
  4. NI Synthesizer and Other Instruments. There are controllers for the Massive and Absynth 5 synthesizers and various Battery 4 Kits (Full Jazz Kit, Jazz Brush Kit, Orchestral Percussion, Timpani, Latin, Eastern and African Percussion).
  5. Vienna Symphonic Library. This contains articulation matrix (small/large) selectors and realtime control of the Dimension Strings (violin, viola, cello and contrabass) sample library.
  6. Sample Modeling / Audio Modeling Instruments. These were designed for the instruments in Keyboard Controller mode and include SWAM Woodwinds (realtime control of vibrato, growl, flutter, noise, etc.) and Brass (articulation and mute selectors for trumpets, trombones, horn and tuba, plus realtime performance controls).
  7. Spitfire Symphonic Library. This implements keyswitch articulation selectors and realtime control of the Symphonic Strings, Symphonic Woodwinds and Symphonic Brass sample libraries (plus Orchestral Harp, Piano and Percussion).
  8. Ample Sound Guitars. Here we find controllers for the Main mode - Picking (articulation, string and fret position, stroke type, etc.) and Strummer Mode (chord and strumming sequence selectors, and more).
  9. Various. General Purpose Midi Controllers: CC16-CC19 and CC80-CC83 faders, faders and knobs for CC1 (Modwheel), CC2 (Breath), CC4 (Foot), CC7 (Volume), CC10 (Pan), CC1 (Expression), CC64 (Sustain).

Lemur Controller for VSL Dimension Strings library Using these controllers enables multiple hand and finger control of realtime parameters, workflow speed increase, reduced mouse RSI risk. No more frequent consulting of software instrument manuals. The numerous Post-Its on the monitor and binders with KS tables on the desk have finally disappeared. But yes, it takes time to learn the tool and developing the controllers. The free internet Lemur controller collections were of very limited use, so I decided to create my own set.


Writing scripts in Lemur

YouTube video on writing Liine Lemur scripts

Update (December 2017): the first video tutorial on Lemur script writing is available. It is a detailed discussion of the example shown below on this page. You will find it on my YouTube channel in the 'Website Musician Tools' playlist. Here's the link:
Liine Lemur Script for Articulation Keyswitch Selection and Drumpad Playing (13:41).

Lemur Controller for NI Battery 4 percussion sample library Scripts are code modules for personalising the Lemur controller behaviour, and provide non-standard functionality. Writing script code deserves more in depth treatment, a task I may pick up in a set of YouTube videos. Here I will show two examples of typical scripts used in the controller designs.

Below is an example script demonstrating how to initialize a set of drum pads in Lemur (this template is also used for defining articulation keyswitch controllers). The drum pad layout, colouring, text labels, and Midi keys are defined:

// AUTHOR: Frans Absil
// Object Name: drumPads
// Global variables: chMidi, keyNumbers, oldState

// Script name: padsInit
// Execution: onLoad

// Initialize the Pads settings
decl thisObject = getobject();

// set the Midi channel number
chMidi = 1;  

// Set the drum pad matrix size
decl nColumn = 6; // number of columns 
decl nRow = 2; // number of rows
decl nMax = nRow*nColumn; // total number of keypads


// define the drum pad element colors
decl cBDr = RGB(0,1,0); // Bass Drum / Low Timbales
decl cSDr = RGB(1,1,0); // Snare Drum / High Timbales
decl cTom = RGB(1,0,0.2); // Toms
decl cHHt = RGB(0.6,0.8,0.8); // Hihat
decl cCym = RGB(0.3,0.9,1); // Cymbals


// Fill the Midi keyNumbers vector
keyNumbers = {

// Label the pads
decl padLabels = {
'Low Timbale Open','Low Timbale Rimshot',
'Low Timbale Cascara','Low Timbale Hand',
'Low Timbale Mute','Low Timbale Stick',
'High Timbale Open','High Timbale Rimshot',
'High Timbale Cascara','High Timbale Hand',
'High Timbale Mute','High Timbale Stick'

// set the oldState of the pads (fill with zeros)
decl nPitch = sizeof(keyNumbers);
oldState = fill(0,0,nPitch);


The next example script sends Midi NoteOn and NoteOff information when playing the pads. Changes in the drum pad state vector indicate which controller pad elements have been pressed or released:

// Script name: playPads
// Execution: On Expression x any
// Handle pad playing including simultaneous 
// pressing of multiple elements
// Global variable: oldState

// Monitor the current state of the Pads
decl newState = x;
// Determine the changes in the Pads state
decl diffState = newState - oldState;
// Determine the number of elements on the Pads object
decl nPitch = sizeof(diffState);
// Find the current value of the Note Velocity fader
decl theVel = FaderVel.x*127;

decl i;
// loop over the number of Pad object elements
for (i = 0; i < nPitch; i++)
 // Send a Note On event when pressing the current element
 if (diffState[i] == 1) noteout(0,keyNumbers[i],theVel,chMidi);
 // Send a Note Off event when releasing the current element
 if (diffState[i] == -1) noteout(0,keyNumbers[i],0,chMidi);
// update the Pads state vector
oldState = newState;


Lemur Controller Example The scripter window has some quirks: the font size is fixed (too small for a shortsighted eagle), the comments in pale green are plainly illegible (remember Kermit: 'It's not easy being green'), and with a window focus error the script text may be easily erased. I use a safety measure: add the comment line // END OF SCRIPT (see examples above). Here's another tip: write common scripts, such as the setDefaultValues() that is called when loading the GUI or pressing the Reset controller button. That is where I (re)initialize global variables and GUI settings.

Lessons learned from working with the Liine Lemur app

  • The Lemur app is great, due to its flexibility (USB/WiFi connection, networking capability, Midi/OSC control, GUI components and scripting toolset). With a tolerable learning curve controller GUI and script development yields many useful controllers.
  • Control from the iPad is stable, with negligible to acceptable latency. The use of the USB connection, Midi CC protocol, and keyswitch matrices is straightforward.
  • Bi-directional control is a puzzle, not at all well-documented. It took a lot of experimentation to reflect setting changes with the mouse on the computer interface on the corresponding iPad controller. I succeeded with the NI Reaktor ensembles.
  • Logic itself resists the Lemur. Setting up OSC control is hard, controlling the Logic transport and mixer settings proved beyond my capabilities. Probably Apple does not want a competitor for its (most unreliable) Logic Remote app. It is a closed ecosystem, in contrast to the Native Instruments philosophy.
  • The lack of touch sensitivity on the older iPad is problematic: Midi note velocity is not transmitted, an extra controller is needed. Pressing a pad for Midi pitch key selection in sync with the velocity slider is hard and requires both hands.
  • The Lemur development toolkit is convenient. The subwindows are functional: component library for interface design, object attributes, Midi/OSC command settings, and scripting.
  • The Lemur manual needs improving. Layout and text formatting are substandard. Definition of software aspects and attributes is mixed with example statements. Some aspects are insufficiently documented (see my struggle with the bi-directional control). Could do with more examples. Alternatively, put these on the company website, in a knowledge base (instead of the frustrating internet search on user forums). And, by the way, the setup movies are outdated (Mac OS X did change in the meantime).
  • Create your own library of frequently returning GUI element combinations, such as keyswitch pads, predefined radio buttons, reset button, pan + volume + pitchbend + modwheel unit. Include template reusable scripts in these units.
  • In summary: I am a very happy Lemur user and controller developer. It is a great and most flexible software alternative to hardware controllers. It definitely speeds up the workflow and I can reuse GUI elements.