Mapping Novation 49SL MkII Buttons for Start/Stop Recording

Hey :slight_smile: I’m just starting out with Ardour and want to use my Novation 49SL MkII MIDI controller. Since Ardour doesn’t have a predefined mapping for it, I decided to create one myself. Mapping the faders to track gain was surprisingly quick and straightforward, but I ran into problems with the buttons.

The buttons register correctly in the MIDI Tracker:

21111073      Controller chn 1 96 127   # pressed once -> light turns on
21132576      Controller chn 1 96 0     # pressed twice -> light turns off

Each button press sends a single message; releasing the button does nothing. From the Ardour docs, I figured I probably need to use ctl, and this gets closest to working. My minimal test mapping is:

<?xml version="1.0" encoding="UTF-8"?>
<ArdourMIDIBindings version="1.0.0" name="Novation SL49 MKII">
  <Binding channel="1" ctl="96" action="Transport/record-roll"/>
</ArdourMIDIBindings>

With this, pressing the button toggles recording on or off, depending on its previous state. What I want instead is for recording to start when the button is pressed (pulled high) and stop when it’s released (pulled low). I also tried ctl-toggle, ctl-dial, rpn, nrpn, rpn-delta, nrpn-delta, and enc-*, but most of these don’t work at all. I’m not sure what’s going wrong.

1 Like

Do you have any evidence that the controller is capable of sending an event on button release?

Oh, I’m sorry. That was very poorly formulated on my part. That’s what I get for asking ChatGPT to “clarify” what I meant. 100% on me. I’m almost inclined to close this issue and create a new one, since my actual issue is completely different.

You’re absolutely right. It doesn’t send anything when the button is released. For all Ardour or even the controller itself knows, pressing a button and holding it is the same as pressing and releasing. So for clarity’s sake, let’s call this a button action.

The button has a binary state, Light on or off, that’s being toggled with each button action. Toggling the button off send the 0 code, toggling it on sends the 127 code.

In the current state, it toggles the recording in Ardour on or off, but only on the button action, where the button turns on, so when it sends the 127 code. The button action where it’s turned off, so the 0, is completely ignored. This way, only every second button action is registered. It behaves as I would expect with ctl-toggle from the docs. I want the button to be synchronized with the recording in Ardour. Toggling it on should turn the recording on and toggling it off should turn the recording off.

Hope this is somewhat understandable (now without ChatGPT :upside_down_face: )

WOW!! I have a 61SL MKII! I still haven’t got around to mapping it yet, but this is a need to know for me! Thanks for the info!

May thou grooveth!!

Then it seems like you need to bind both the control number and the control value, with value 127 mapped to transport-roll and value 0 mapped to transport-stop.

I don’t see an example of using control number and value in the manual, but maybe one of the existing map files does.

Have you tried action=“Transport/ToggleRoll” ?
The wiimote map has which is note, not control number.
The Alesis QX25 map has this commented out map:

It looks like it might be what you want, but I don’t know why it is commented out. It has a comment above that it binds the foot controller to toggle transport. Maybe that is non-standard or optional so is not included by default. Not sure, no other details in the comment.

I don’t think one can specify a value. As you said, the manual makes no mention of it and I don’t see any existing maps using that. From the manual, it seems like this use case should already be covered. Either by ctl or ctl-toggle. I find it to be a little bit ambiguous. In the official video guide, he seems to use ctl for a button that sends the 0 on release, which makes me believe I should be using ctl-toggle. I believe I might just have to dig into the code, why ctl-toggle does nothing at all in my case.

I did just now. Didn’t really change anything. Transport/ToggleRoll does something a little different (as intended, I suppose) as Transport/record-roll, but the issue with the button stays the same

Okay. I’m gonna call this done. Here’s what I’ve found:
ctl ignores the 0 input. ctl-toggle is the one I would have needed.
The problem is that actions and functions don’t work with ctl-toggle. Those only support ctl, note, pgm and sysex. The code throws a warning, but I’m not that familiar with c++, so I don’t really feel like finding out. Would have been a nice info, but in case anyone finds the need to look further into what’s possible, the relevant functions are GenericMidiControlProtocol::create_action for actions, GenericMidiControlProtocol::create_function for functions and GenericMidiControlProtocol::create_binding for uri.

What worked was ignoring all the niceties Ardour gives us and just passing the raw bytes as a msg. Maybe not the intended way, but it works. There are three bytes you need (At least in my case. Apparently, more are possible). You can find them in Ardours MIDI tracer (Window → MIDI Tracer).

  • press the button
  • Ignore the 8 digit number at the front
  • the eventType, in my case Controller is the first byte (0xb0 for controller). You can find a map from eventType to the byte value in the enum eventType in the libs/midi++2/midi++/types.h file in the Ardour GitHub repository.
  • ignore the channel. I’m on chn 1, but I could imagine you might need to mess with that if you’re not
  • the last two numbers are the other two bytes you need. The CC identifier (96 / 0x60) and the value (0 / 0x00 or 127 / 0x7f). Make sure not to check the decimal box to get the hex bytes. ctl understand decimal, msg requires hex.

Create one binding for on / 127 / 0x7f and one for off / 0 / 0x00

  <Binding msg="b0 60 7f" action="Transport/record-roll"/>
  <Binding msg="b0 60 00" action="Transport/record-roll"/>

Now pressing the button once turns the light and recording on, and pressing it again turns both off.

1 Like

I’m probably gonna map some more buttons and create a pull request anyway, but it might take some time until it’s added to the official download build. Contact me if you want me to send you a version sooner. With some luck, it will be a drop-in replacement.

Oh please do! This is all new to me, (well in Ardour on Linux) at least. I think all of the controls are the same, but I may have more controls for having more key’s, and with it more length and room for more. feel free to correct me if I’m wrong.

Mechanically and in features it’s quite a good keyboard from what I can tell, and it feels really piano like, well at least for me a mere guitar player who only got to play a few real and good piano’s with little clue what the F I was doing: Chopsticks on acid in alternating 6/8 14/8 probably. :crazy_face:

I looked around trying to find how to contact others, in this case you, but can’t find the widget or place to do so. :woozy_face: If anyone knows I’d appreciate the help.

There is no direct message functionality on this forum between users. Sorry.

1 Like