this is spooky.... this is *exactly* what i've been working on the the last few weeks. i wanted to not have to use the controller manager - have multiple banks/pages for any control surface and also to be able to use the same one (launchpad in this case) for both traktor and ableton.
the actual app is C++ using a cross platform midi library (RtMidi) and an embedded LUA interpreter for cool/custom stuff...
i havent mapped *all* traktor functions - but a lot - i didnt map decks C+D or sample decks A+B for example. as a) i wont be using them and b) it was really boring creating that tsi...
i have a devices/traktor.lua file that maps the tsi to names like this:
Code:
add_control("copy_from_loop_recorder_c1", 5, "cc", 24);
it has 556 entries at the moment - so not exhaustive but enough for me to get started with.
the idea is i can route from any device/cc/note to any other device/cc/note and/or attach some lua code that gets called when the event comes in. i am using loopBE to create all my virtual midi ports - including 2 for traktor for that 2 way comms.
the upshot is that i use lua code to configure the mappings and when an event comes in it either gets processed directly by the C++ core if a simple routing etc or some lua code gets called to process it. so far i cant tell any latency issues due to the lua callbacks which was my concern initially - but i wanted a lighteweight embeddable scripting language that was flexible enough to do anything i needed.
the app first looks for a config.lua that loads up devices - which map midi ports to names like this:
Code:
open_midi_device("nanokontrol", "nanokontrol", "nanoKONTROL", "nanoKONTROL")
open_midi_device("hercules", "hercules_mk2", "Hercules DJ Console Mk2 MIDI", "Hercules DJ Console Mk2 MIDI")
then i can put calls to capture_event() in the config to specify callbacks for different events and/or use higher level functions like these two:
Code:
create_yfader("launchpad", 0, 7, {1,2,3,4}, "launchpad", "solo", 8, lp_lo_red, lp_mi_red)
create_midifighter("launchpad", 0, "midifighter", 2, 2)
also it keeps track of virtual pages for any device if specified in the config file.
oh - ramble over - hope some of that made sense - it's been a long day and am knackered.
Bookmarks