Initialize a MIDI control surface

Hello, I bought a Novation Launchekey 49 MkII, and trying to integrate it with Ardour more.

There is a bundled intergration file for Launchkey 25, but I don’t like that mapping, and also 49 has more controls (9 faders and buttons, while 25 has only one). So I fully read (i think) manual (at http://manual.ardour.org/using-control-surfaces/generic-midi/midi-binding-maps/ ), created much more sophisticated setup which uses banking feature (using track < > buttons on the controller to switch) and so on. But, If I do so, I lose possibility to use these controls for in-track control, for instance, a MIDI synth (I am willing to move some bits inside ZynAddSubFX while recording).

What I want is to switch keyboard mode to “Extended”. To do this, I need at least to be able to send a MIDI event to it (a certain NOTE ON message).
I certainly can do this outside of Ardour (right now I’m doing this with mididings), but that is cumbersome. I prefer to do everything from inside of Ardour.

Is it possible to instruct Ardour to send MIDI messages (for example, that could be a “controller initialization” section of generic MIDI mapping)?
Is it possible to send MIDI messages from Lua script?

Ideally, also there could be even more done with this device. There are 18 RGB LEDs which could be set to one of 128 colour (one of which is “not lit”), to pulse intensity, or to blink between two colors in sync with MIDI clock. So if Ardour will provide sync and some Lua script provide events to set up lights, these could be used to indicate visual metronome blinking, to show state of track switches (so as mute/solo/arm-record).

@merlin-vrn great to hear you have the build system all sorted out! :slight_smile:

A full build environment is absolutely no problem for me, I have it right here, I’m Gentoo user after all :slight_smile:
Having to write C++ code is much more difficult task. I probably try someday…

Thank you!

Just to follow up from a comment @Paul states above, setting up “a full build environment” is an order of magnitude easier on Linux. I have tried this on MacOS and failed horribly. As Linux is accessible by anyone (any you may already be on it) its basically a non-issue on that platform. I can’t comment on Windows, but possibly WSL (Windows Subsystem for Linux) may be helping quite a bit.

MacOS’s main issue is that because its already POSIX, they have many libraries implemented, but they are different, rendering any default build system for Ardour a nightmare. In contrast on Linux you normally get the correct libraries the first time. (and we are not even talking about Ardour customisations).

Doing more means writing code. Because Ardour is open source, we don’t provide a “scriptable extension API” to write control surfaces … you get to write C++ with full access to everything inside ardour. This puts a lot of people off, because they don’t want to have to get a full build environment set up, or they are intimidated by C++. That’s unfortunate, but that’s how our control surface support works.

One day, we may provide an “easier” way to implement dedicated device support that knows how to do device-specific interaction.

Right now, another user is at work implementing support for the LaunchControl XL. He started by just copying one of our existing surfaces and is modifying it to deal with the specifics of the LC.