[LAD] MIDI maps : C++ functions

From: Harry Van Haaren <harryhaaren@email-addr-hidden>
Date: Wed Mar 23 2011 - 02:44:24 EET

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

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Mar 23 04:15:03 2011

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2011 - 04:15:03 EET