Questions about expressions in Sysex Data



I’m using a background rack to better control my keyboard (now an Arturia Keylab mkII 88) and have some questions about sysex and expressions.

I’m able to bind some keys to change songs and states, which was easy.
On Song Load and State Load, I’m also able to send Song Title and State on the ASCII screen using sysex messages.

  1. My first issue is that I want to take only the 16 first characters of the Song Title and the State Name.
    This works well with substr() for Song Title, but this does not work for State when there is no State for the Song. In this case, this will give a “No Reference” error.
    So basically, I need something like : State == null ? “” : substr(State, 0, 16)
    …but this also gives a No Reference error so I’m back to square 1.

I’m also able to switch some button’s lights with Sysex messages which is great. This time, on Song Load, I would like to use it to see the “state” of the Song’s Plugins (i.e. if they are Running or not). This way if Plugin 1 is running, Plugin 2 is running and Plugin 3 is not running, I would see Button 1 lighten up, Button 2 lighten up and Button 3 not lighten up.
(I have already covered the part where pressing the button will change the state of the Plugin by it’s number)

  1. What kind of expression can I use to check whether Plugin number X is running or not?



Hi Toto,

I do this with my keylab 61 II, and I don’t need to substr the state. It’s likely that all my state names are less than 16 characters anyway. I’m not in front of cantabile, but this is the expression I use to put the song on first line and state on second line (and if no state is defined it still works):

SysExExpression:x"F0 00 20 6b 7F 42 04 00 60 01 " substr(SongTitle, 0, 16) x"00 02" State x"00 F7"



Hi John

I have something very similar for the display.
Indeed, I should just keep the State names under 16 chars for the moment.

I hope I will be able to find the plugin states: this is the more difficult one. Otherwise, I will have to duplicate this in all Songs instead of the background rack and will have to synchronize manually each time I change the plugin’s initial configuration.

Just in case this helps other keylab mkII users, here are the sysex to set the button’s light:

Button 1 (0x22) on:
F0 00 20 6B 7F 42
02 00 10 00 00 22 01

Button 1 (0x22) off:
F0 00 20 6B 7F 42
02 00 10 00 00 22 00

I have not found how to control the LED colors yet.


Hi Toto,
Thanks, this is great, I cannot find the sysex table for my new keylab 49 mk2; Roland publishes these tables, but I can’t find them for Arturia, unfortunately. My goal: setting the button light from a Cantabile song with the right color on the right bank (since there are 3 banks available). This is the first step :slight_smile:



Hi Jan,

This is the resource I used - I don’t think it includes colour. I couldn’t find any arturia docs, official or otherwise.



Would you please better explain what kind of binding must I use to achieve this ??


This is what I got from Arturia 2 days ago:

Thank you for using our instruments!

Sorry for the inconvenience but there is no MID Implementation chart and we don’t provide that kind of documentation.

Sorry for the inconvenience.

Please feel free to contact us if you need more assistance.

So basically, no official documentation apart from what we get on the Arturia’s forums from enlighten users + our trial and error.


Yeah, found out so myself. And I simply didn’t find a way to ‘snif’ midi messages (e.g. from the midi control center), because an application locks the midi-driver once used.
Thanks for sharing, anyway.


In my case, I’m activating the LED on button 1 when I’m enabling/disabling a midi route (part 1).

Based on de ‘Enable’ state the LED is activated using this sysex-expression. ‘value’ is a standard variable that is set based on the state.

I hope this helps, good luck!


Hi @JanM

Thank you for this binding!
It took me a round trip to the documentation to activate the bindings for the midi routes but I can see them now (in case this helps others: you have to select a route and (re)name it with F2 first before it appears in bindings).

I’m not sure I can use this in the background rack because of the reference to the midi routes but I will give it a try on a Song.