[LAD] MIDI maps : C++ functions

Harry Van Haaren harryhaaren at gmail.com
Wed Mar 23 00:44:24 UTC 2011

Hey guys,

I'm wondering how to approach creating a MIDI map to all controllers
available in the GUI. Needless to say I can hard code in a MIDI CC, and from
JACK's process callback call the function that I want to map that control
to, but that's a little rigid.

I like Ardour's one-click map idea, and I'm wondering how its implemented.
Here's what I concluded so far:
On mouse_3 down, pop up dialog, send message to JACK process to keep next
MIDI input stored somewhere. That's the CC to map

Where I'm getting stuck is how to make each CC point to a different
"parameter" in the software, or a different function in the code. Function
pointers come to mind, but somehow I don't like that idea much. Creating a
generic interface to map every control in the entire engine might work, but
I think that may be a little overkill?

I'd be interested to hear how various projects handles this internally, if
anybody wants to chip in?
Cheers, -Harry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20110323/54befb37/attachment.html>

More information about the Linux-audio-dev mailing list