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!

1 Like

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.

Hi guys!

Thanks for this thread, it’s really helping me with using my Keylab and Cantabile!

I’ve got the sysex working to display the text I want. However, I’m using the pads to change rackstates and it works great but the keylab insists on displaying the details of the pad straight away after displaying the text I want (from the Cantabile sysex binding). So I see my text for a split second, then it goes back to Pad 13 Note etc… I was using Rack state on Load to trigger the binding at first, then I had a ‘brain wave’ and thought that using the note on message from the pad to trigger it would fix it but same issue.

So basically what I’m asking is, is there any way to stop the keylab from defaulting to displaying whatever controller you’ve just pushed/moved?

Thanks as always to all in this great forum, I’m seriously getting down the rabbit hole with the sysex and bindings now…


I fixed this with a short delay on the binding - so that the Keylab shows the controller change, then a few hundred milliseconds later the binding triggers and updates the display.

Aah, ok, I’ll try that!

Thanks again John

Hi @JanM, @johncarter, @Toto

Did you see the thread that I went through with @dave_dore about all this? I’ve now got the lights and pad lights on my Keylab doing exactly what I want now, along with resetting to the state a rack was last left in, etc. It’s quite cool what I’ve got it to do, if you want to check it out, maybe something in there will give you some ideas…