"Intermediary midi mapping" software *discussion thread* (Traktor mapping is a pain)

Home :: Post and find Controller Mappings :: "Intermediary midi mapping" software *discussion thread* (Traktor mapping is a pain)Reply
"Intermediary midi mapping" software *discussion thread* (Traktor mapping is a pain)
Posted on: 16.06.2011 by Arcelia Siebeneck
Introduction

Just wanted to start a discussion thread regarding the shortcomings of mapping midi controllers using Traktors default mapping options. And by that, I don't just mean the annoying non-resizeable window, lack of serious copy/paste/clipboard functions and the recent inablity to directly edit the xml mapping files with a text editor. What I'm really talking about is the limitations of the default Traktor midi mapping window to achieve more powerful, dynamic and complex mappings... mappings that go well beyond what Traktor is normally capable of.

So what do I mean by this? Well if we look at the djtt firmwares for the vci-100 and midifighter as an example you can see that Traktor is capable of some amazing things. Superfaders, fx triggers, etc are made possible by combining various midi commands into one control which are then executed in a certain way. The only realistic way to achieve this is by re-writing the firmware on a midi controller at a hardware level. Yes, it's true that some of these effects can be done via a plain old Traktor mapping - but it gets very complicated and isn't as full featured.

The obvious disadvantage with using modified firmwares is that only a few people have the skill and know how to write them. Also, the firmware will only work on specific midi hardware. What I propose is some sort of intermediary midi software that sits between Traktor and your hardware. A utility that allows full access to every midi command available in Traktor with the aim of achieving the kind of custom mappings only normally available via custom firmwares.

The solution

This isn't an easy undertaking so I'm hoping that the clever people on DJTT can get involved in the discussion and hopeful development of such a tool. In the absence of any sort of Traktor public SDK, here's how it could be achieved:

Traktor - A mapping is created that maps literally every control to a different midi CC. All these controls are set to receive midi from a virtual midi device such as LoopBe. The midi commands are then routed via LoopBe from the mapping utility which could be created via one of the following programs:

Synthmaker/SynthEdit - Both Windows programs which allow the creation of midi plugins/vst's. Usually the plugins are effects/synths for DAW's such as Cubase, Ableton Live, etc however they can also export standalone Windows executables with midi in/out functionality.

Reaktor - Same as Synthmaker/Synthedit but probably more powerful and there may be more people on here that know how to use Reaktor properly. Trouble is, I don't believe there's a plugin export function so you'd need to run Reaktor in the background.. not ideal.

Emulator - the new version of Emulator allows you to design your own touchscreen interface GUI and map midi commands to each button/control.

GlovePie - probably quite a good option as their is decent scripting and midi support. Disadvantage is that it's a bit unstable in my experience.

Autohotkey - my area of expertise (lol) but not really designed for such a job... I might use it to knock up a prototype though.

VisualStudio - probably the most viable and professional option... a decent programming language that is stable, fast and powerful.


So what would the custom midi mapping software look like? and what kind of things could it do?

This is obviously up for discussion, but the first and most important function should be a wholesale replacement of the standard Traktor mapping window. The tool should allow easy duplicating, adding, deleting, etc of all the various Traktor controls and the ability to setup modifiers etc.

Once this is implemented, we can look at ways to achieve complex midi mappings based on rules, scripts, etc. This might enable functions such as superfaders and other midifighter features but also:

- complex ADSR/LFO based controls
- sequenced/pre-scripted midi control
- Serato-style continuous play in the background after beatjuggling has ended
- GUI editor for custom diy controllers (edit the midi controls in a more visual manner)
- simpler midi LED mappings
- stuff I haven't even thought of...!

How you can help

Feel free to contribute to this thread... let me know if this is something that you would find useful and what you would do differently. The suggestions I've listed above are just ideas and I'm keen to get something developed that will be useful for everyone so get posting
Shasta Utech
28.09.2011
Amazing work, i see that it works on the lpd8, will it also work on my nanopad2 or do i need to tweek anything in the code?
Chasidy Heckenbach
22.09.2011
very minor update, but grab this if anyone wants to try it and hasn't grabbed a version yet:

http://djism.com/mm/midimasher-20110921.zip

only change is in dump.exe, where it wouldn't work if it only found one midi-in device.

btw... dump.exe is *not* trying to replace something like midi-ox, it's only there to debug issues as it uses the same RtMidi lib as the main midimasher executable and also the same midi message decode code of mine - so is useful if it's not reacting as expected to midi input.

i had a friend test it on his laptop and seemed to run - tho as he only had a midi wind controller and no traktor etc the testing he could do was a bit limitted

dump.exe can now also log to a file - which could be useful for debug.
Allene Manitta
20.09.2011
will give this a try this week, will report back!

thanks for your work so far!
Chasidy Heckenbach
16.09.2011
Originally Posted by MiL0
bigups zestoi
cheers i just hope it actually runs on someone else's machine and i haven't forgotten to package something etc
Arcelia Siebeneck
16.09.2011
bigups zestoi - looking forward to trying it out
Chasidy Heckenbach
16.09.2011
did i just reply to a bot? ah well... if so then that's the 2nd time in as many days

both of "sushilrai" look like they could have been scraped and spun... apols if i am wrong ofc
Chasidy Heckenbach
16.09.2011
plus it's not like having middleware like midimasher is any new kind of concept... automap is used by a lot of users as are custom apps like DaRouter based on bomes etc. and who knows what other cunningness some maufacturers hide in their driver code instead of putting in the firmware...
Chasidy Heckenbach
16.09.2011
Originally Posted by sushilrai
The only realistic way to achieve this is by re-writing the firmware on a midi controller at a hardware level.
completely untrue - all u need is something like midimasher to sit between your controller(s) and app(s). latency and handling massive amounts of traffic are the main concern - which is where having custom firmware instead wins.

adding custom funcs like those found in the vci/mf/etc is at least part of the reason for my midimasher software - to add that kind of custom functionality that (for the most part) you can't get from the base firmware.

plenty of other reasons too ofc. you can do some stuff so simply with some custom lua code in midimasher than you'd never be able to get with any firmware in a controller, even if you do have the source (like for a midifighter) and were willing to recode the C and recompile each time u wanted to tweak something.
Suzann Westermeier
16.09.2011
Well if we look at the djtt firmwares for the vci-100 and midifighter as an example you can see that Traktor is capable of some amazing things. Superfaders, fx triggers, etc are made possible by combining various midi commands into one control which are then executed in a certain way. The only realistic way to achieve this is by re-writing the firmware on a midi controller at a hardware level. Yes, it's true that some of these effects can be done via a plain old Traktor mapping
Chasidy Heckenbach
15.09.2011
new version which includes a config for a virtual midifighter in 4banks mode on a lpd8, should also work on a launchpad with the device name changed:

http://djism.com/mm/midimasher-20110915.zip

edit: forgot to add that since this is just emulating a midifighter it needs two new virtual midi ports (via loopMIDI etc):

* MidiFighter1 Input
* MidiFighter1 Output

they are case sensitive... you then just load the instant grat tsi as you would if u had a real midifighter and set the input port in traktor as ""MidiFighter1 Output" and the output port as ""MidiFighter1 Input"

this is the contents of "config/lpd8_midifighter_4banks.lua" and there's a couple of lines u can comment out if you have 2 lpd8's to be used pushed together to give u the full 4x4 grid without needing to change between PAD and CC modes (tho i dont have two (yet) so can't test):

Code:
--
-- virtual midifighter using a lpd8. PAD mode is the top half and CC mode is the bottom half of the MF
--

open_midi_device("traktor", "traktor", "Traktor to MM", "MM to Traktor", 2);
open_midi_device("lpd8", "lpd8", "LPD8", "LPD8", 2);
open_midi_device("midifighter1", "generic", "MidiFighter1 Input", "MidiFighter1 Output")
virtual_midifighter_4banks("lpd8", 0, "midifighter1", 0, 0, 0, 127)

--
-- to use a 2nd lpd8 to be the other half of the midifighter, set one to PAD mode and
-- one to CC mode and then uncomment the following lines:
--
--open_midi_device("lpd8-2", "lpd8", "LPD8", "LPD8", 2);
--virtual_midifighter_4banks("lpd8-2", 0, "midifighter1", 0, 0, 0, 127)
--
final edit: this config will actually work on any controller that has 16 pads. just need to run learn.exe, enter how many rows+cols and press each pad in turn to create a config file for that controller...
Chasidy Heckenbach
12.09.2011
Originally Posted by kostis12345
Ooooh, first version. Great, I now need to overcome my laziness and hatred for windows and turn on my Win Laptop to test it. Nah, a bit later :P
cool lol. yep - posted the first version 3 days ago. i don't *want* loads of people to see it yet, hence not creating a new thread with a more obvious title like "lpd8 slicer mapping for traktor" as i want to try and iron out any possible issues on the quiet first...

and as said the slicer is far from perfect - i need the code to generate a quantize event that coincides with traktors quantize zones so it can make a better guess as to where traktor will jump to when it's told to beat jump.

edit: afaik all thats really missing atm are some simple-ish functions to create virtual faders ala automap/midikatapult and to test/fix the virtual midifighter functions and my scs.3d specific code - as i wrote those for a previous incarntion of my core api - and then i can actually start using it to create all the mappings i want/need (and anyone else ofc)

edit2: i'm also open to the idea of a more simple config format more along the lines of the ones in midikatapult. i.e: not raw lua calls, but lines that specify what mappings are needed that then gets parsed and calls the needed lua stuff etc. a gui might be a nice idea of some kind, but i'm not really a gui coder, and would restrict what u could and couldnt do with it probably.
Jan Manzoni
12.09.2011
Ooooh, first version. Great, I now need to overcome my laziness and hatred for windows and turn on my Win Laptop to test it. Nah, a bit later :P
Chasidy Heckenbach
12.09.2011
i'll post a new version with a config to run virtual midifighters in a couple of days - but would appreciate any feedback to see if it actually runs ok on other peoples laptops first.

if so then i might risk posting a new thread to get more visibility...
Chasidy Heckenbach
09.09.2011
ok, here's a first version of the code. included is the lpd8 mapping i've been working on as a testbed for it, tidied up and rearranged so it's at least half useful - maybe.

download link: http://djism.com/mm/midimasher-20110910.zip

i'm using loopMIDI for the 2 required virtual midi devices - but any other app should in theory work too, make sure you have two virtual devices called "MM to Traktor" and "Traktor to MM"

all the config for this setup is in config/lpd8.lua, you can rename the device names there if you need to. it assumes the lpd8 is called "LPD8" in your device list, but will also ignore a prefix like "1-" etc - as windows tends to add those when you connect to different usb ports.

double click on midimasher.bat and you should see this output more or less (you have to enter the number for the lpd8.lua config file):

Code:
midimasher: build 20110910

#1: default.lua
#2: lpd8.lua

select a config > 2

midi: scan devices...
midi.in.0: From SCS.3 DaRouter
midi.in.1: MIDI Sync
midi.in.2: MM to Traktor
midi.in.3: Traktor to MM
midi.in.4: LPD8
midi.out.0: Microsoft GS Wavetable Synth
midi.out.1: 2- To SCS.3 DaRouter
midi.out.2: MIDI Sync
midi.out.3: MM to Traktor
midi.out.4: Traktor to MM
midi.out.5: LPD8
lua: register functions...
lua: run embedded lua...
loading: lib/startup.lua
loading: config/lpd8.lua
traktor: open midi.in.3: Traktor to MM
traktor: open midi.out.3: MM to Traktor
loading: devices/traktor.lua
lpd8: open midi.in.4: LPD8
lpd8: open midi.out.5: LPD8
loading: devices/lpd8.lua
registering events...

running... <ctrl>-<c> to quit.
you need to startup things in this order:

1 - loopMIDI (or other virtual midi device app)
2 - midimasher.bat
3 - traktor

once you've done that you can kill and restart midimasher as often as you need to when editting configs etc, but it needs to be running before traktor initially else traktor seems to lock the midi ports.

in the "settings" dir is my settings for the lpd8 editor which is just the defaults afaik and the traktor.tsi file. connect the tsi to the "MM to Traktor" and "Traktor to MM" ports (which is which should be obvious )

checkout config/lpd8.lua for more info but this is the layout:

Code:
-- +--------+--------+--------+--------+
-- | slicer | slicer | sync   | deck   |  
-- | on/off |loopmode|        | a/b    |  \
-- +--------+--------+----- --+--------+   * PAD mode
-- | play   | cue    | seek-  | seek+  |  /
-- |        |        |        |        |
-- +--------+--------+--------+--------+
-- | hot    | hot    | hot    | hot    |  
-- | cue 1  | cue 2  | cue 3  | cue 4  |  \
-- +--------+--------+--------+--------+   * CC mode
-- | loop   | loop-  | loop+  | shift  |  /
-- | active |        |        |        |
-- +--------+--------+--------+--------+
-- | beatjmp| beatjmp| beatmp | beatjmp|  
-- | -16    | -8     | +8     | +16    |  \
-- +--------+--------+--------+--------+   * PC mode
-- | beatjmp| beatmp | beatjmp| beatjmp|  /
-- | -4     | -2     | +2     | +4     |
-- +--------+--------+--------+--------+
--
-- * when 'deck' pad is lit, controls are for deck b
-- * when slicer is active CC mode pads become the slicer pads
-- * shift & hotcue to delete else they set/jump
-- * shift & loop+ or loop- to tempo bend
-- * pots control eq+levels for decks a+b
-- * slicer starts on the beat u activate it on
if anyone wants to tweak anything look in devices/traktor.lua for the names for events that tie into the tsi file, lib/slicer.lua for the slicer code. the slicer is far from perfect and gets confused easily depending on when you press pads - so if anyone wants to have a look at that code that's fine by me

hack around as much or as little as needed in config/lpd8.lua too ofc...

it seemed to run ok on my xp laptop, tho i didnt have any midi devices attached.

probably way too many layers here - for example u need to be in PAD mode to toggle between decks a and b - but as said this is more of a testbed than anything.

the worst that should happen is that it just doesnt run - but hopefully i included all needed files - use at your own risk - comes with no warranty of any kind
Chasidy Heckenbach
08.09.2011
Originally Posted by deevey
As some will know I went and decided to buy xtreme mapping last evening , once I got the bugs sorted out (corruption on my original TSI) it works like a champ, but not as good as I thought it might be.
i hope NI implement some ideas from XM into traktor sometime soon or the XM team port their code to windows. neither of which i suspect is likely.
Chasidy Heckenbach
08.09.2011
i've been messing with trying to work out the best names etc for the api before i release a copy so i don't have to make any uber changes later on and trying various mappings to find issues but it's about time i uploaded a zip.

i've been compiling under cygwin so will need to include that dll for now - dont *believe* its really needed as 99% sure i can compile under mingw but that'd need more testing.

will package up whats ready to release and do a quick test on my xp laptop. should in theory work as its only a 32bit compile - hope so anyway, dont fancy having to compile 2 diff versions for win7 and xp.

the final mapping i have atm for the lpd8 isnt exactly awesome and the slicer gets confused by traktors quantize sometimes, but all that code is all just lua so anyone else can have a go at improving it anyway.

will report back today with a zip file.

edit: also this lpd8 mapping probably has way too many layers to be really usable - its more a test bed for the code, since it uses pad/cc/pc mode doubled up for decks a and b (so 64 virtual pads already) then the cc mode pads become slicer pads instead of hotcues when the slicer is active (so more like 80 virtual pads) plus there's a shift button in hotcue mode for deleting hot cues....
Rolanda Clodfelder
08.09.2011
As some will know I went and decided to buy xtreme mapping last evening , once I got the bugs sorted out (corruption on my original TSI) it works like a champ, but not as good as I thought it might be.

But could do with some real improvement in relation to the mapping process - so heres my thoughts on it.

1. Live Mapping somehow - so changes are realtime within traktor and not requiring an import.

2. GUI Skin with selection, even if its not actually overlayed physically on traktor itself (which would be cool) it'd be nice to just click a fader for example on the "dummy GUI" and assign.

3. FX Combo's built in - its one of the most time consuming parts of the mapping process, being able to select a knob on a GUI and just assign for example "beatroll reverb" would be the dogs nuts, if you have complex Combos right now you might need to assign 6 or 10 parameters via selection and manually, right pain in the Arse.

4. Multiple Selection learn - Simply being able to select multiple Objects e.g. Select both Cue and Assign via list or ctrl+select on a gui, and turn a single knob to learn.

When I was mapping I was a lil disappointed that I had to map the outs separatly to the buttons even though its the same CC, this would be a massive timesaver on something like the APC.

Of course NI could get off their asses and improve the editing functions ... Torq and Ableton style "click n' map" would be the icing on the cake, maybe a rightclick Dropdown for FX Combos
Keli Vandenbergh
08.09.2011
Processing?

http://processing.org/
Arcelia Siebeneck
08.09.2011
any updates?
Chasidy Heckenbach
29.08.2011
Originally Posted by gingerman
Zestoi, could your led problem have anything to do with the lpd8 editor settings? you can change the pad from toggle to momentary, I had to do this to sort out some led issues with one of my mappings. Can't remember which way round helped but I can check tomorrow of it helps :-)
nope - they're all set to momentary. the issue is that for most things midi events happen in this order:

1) press a pad thats assigned to play deck a on the lpd8
2) midimasher sends out the midi message to traktor
3) traktor sends back a play_a event feedback which lights up the pad (tho its already lit up ofc as you're holding it)
4) release the pad and the led goes out (even tho we've sent a +ve midi message to lpd8 to tell the pad to light - thats ignored)
5) midimasher needs to catch the midi off event from the pad release, and if traktor is currently playing then send the lpd8 another +ve midi message so it doesnt go out

that particular issue my code handles fine, but just not in all cases. setting cue's has given me a few headaches as you always want the led to be lit or not based on the "loop active" feedback from traktor but also send the loop set midi message as well.

it all 95% works, just a few oddities here and there. usually just when i believe i have all the bases covered i try to map something else and find another quirk.

most of these issues are related in some way to the lpd8's madness of always turning off an led when u release it. and only in pad and cc mode as you cant light up the pads over midi in pc mode from what i can see - still useful as triggers tho.

i actually got side tracked doing real work since last posting here but will have time to finish this tomorrow. with or without quirks i'll post a version. plus most bugs will probably come out in the wash when other people try to make configs and do stuff i just hadnt thought of.

with 2 tracks playing in traktor and level/beatphase feedback etc and debug turned on which dumps all incoming and outgoing events, with my current config, it eats up a massive 1% to 2% of cpu according to the task manager with debug off it always says 0, so less than 0.5% cpu i presume.

and no extra delay that i can tell but probably need to test it with the jogs on my icon idj again - as they're pretty bloody responsive when connected direct to traktor.
Odilia Gatica
29.08.2011
Zestoi, could your led problem have anything to do with the lpd8 editor settings? you can change the pad from toggle to momentary, I had to do this to sort out some led issues with one of my mappings. Can't remember which way round helped but I can check tomorrow of it helps :-)
Odilia Gatica
30.08.2011
Originally Posted by kostis12345
I believe LPD8 is a better choice (not that I own one or anything like that xD)
+1:-)
Jan Manzoni
29.08.2011
I believe LPD8 is a better choice (not that I own one or anything like that xD)
Chasidy Heckenbach
29.08.2011
today hopefully. i thought the lpd8 would be a good one to try first as its so common, but having some issues with it always turning off the leds when u release a pad. works in some cases (like toggle buttons) but not all.

currently having fun (lol) trying to map loop set/active, as its the loop_active message that needs to turn on/off the pad while its a loop_set i want to send out.

getting there anyway... no issues at all like this with the code on a launchpad so maybe i should have come up with a mapping for that first
Odilia Gatica
29.08.2011
Any updates soon Zestoi? Cant wait to try this out
Chasidy Heckenbach
26.08.2011
Originally Posted by Subconcussion
I don't know if it is mentioned here, if so sorry for mentioning it again. You know Xtreme Mapping for mac. It works and they have obviously cracked the encryption of .tsi files (else they wouldn't be able to save files in the format, less make them work flawlessly in Traktor). So has it occurred to anyone with a mac and interested in fixing a decent mapping program for windows or whtvr to actually open xtreme mapping and see what code lies in there and find the encryption key?? It is probably easier than looking to Traktor, I know Xtreme Mapping is written in Cocoa which makes it quite easy to understand...
i doubt it's as simple as just a static decryption key, but would nice to be wrong on that.

that app does look very cool and i'd buy a copy if i had a mac. my midimasher isnt trying to be the same kind of app as that, tho if someone coded a gui to create its config files then it could do almost the same thing (you'd still need to tweak the actual tsi for jog wheel sensitivity settings etc)

this app does the same kind of job as things like bomes or midikatapult but with event names tied to midi data (and in the case of traktor a massive tsi file) so that you can route events by name from any app/controller to any app/controller.
Aimee Dacey
26.08.2011
I don't know if it is mentioned here, if so sorry for mentioning it again. You know Xtreme Mapping for mac. It works and they have obviously cracked the encryption of .tsi files (else they wouldn't be able to save files in the format, less make them work flawlessly in Traktor). So has it occurred to anyone with a mac and interested in fixing a decent mapping program for windows or whtvr to actually open xtreme mapping and see what code lies in there and find the encryption key?? It is probably easier than looking to Traktor, I know Xtreme Mapping is written in Cocoa which makes it quite easy to understand...
Lewis Stumpf
26.08.2011
Cool cool. Can't wait to test it
Chasidy Heckenbach
26.08.2011
in case anyone is curious - this is the config file i'll be trying to finish a bit later, so i can release a version of the midimasher. gives u an idea of the kind of lua code that can be used anyway. no actual midi stuff happens in the lua code, only named "events"

Code:
-------------------------------------------------------------------------------
-- connect devices
-------------------------------------------------------------------------------

open_midi_device("traktor", "traktor", "Traktor to MM", "MM to Traktor");
open_midi_device("lpd8", "lpd8", "LPD8", "LPD8", 6);

--
-- function layout:
--
-- +--------+--------+--------+--------+
-- | slicer | loop   | jump   | deck   |  
-- | on/off | mode   | mode   |        |  \
-- +--------+-------- +-------+--------+   * PAD mode
-- | play   | cue    | sync   |        |  /
-- |        |        |        |        |
-- +--------+--------+--------+--------+
-- | hot    | hot    | hot    | hot    |  
-- | cue 1  | cue 2  | cue 3  | cue 4  |  \
-- +--------+--------+--------+--------+   * CC mode
-- | loop   | loop-  | loop+  | shift  |  /
-- |        |        |        |        |
-- +--------+--------+--------+--------+
-- | slot   | slot   | slot   | slot   |  
-- | c1     | c2     | c3     | c3     |  \
-- +--------+--------+--------+--------+   * PC mode
-- | slot   | slot   | slot   | slot   |  /
-- | d1     | d2     | d3     | d3     |
-- +--------+--------+--------+--------+
--
-- * when 'deck' pad is lit, controls are for deck b
-- * when slicer is active CC mode pads become the slicer pads
-- * shift & hotcue to delete else they set/jump
-- * shift & loop+ or loop- to tempo bend
-- * pots control eq+levels for decks a+b
--
-- pad names:
--
-- +--------+--------+--------+--------+
-- |  0,0   |  0,1   |  0,2   |  0,3   |
-- +--------+--------+--------+--------+
-- |  1,0   |  1,1   |  1,2   |  1,3   |
-- +--------+--------+--------+--------+
-- |  2,0   |  2,1   |  2,2   |  2,3   |
-- +--------+--------+--------+--------+
-- |  3,0   |  3,1   |  3,2   |  3,3   |
-- +--------+--------+--------+--------+
-- |  4,0   |  4,1   |  4,2   |  4,3   |
-- +--------+--------+--------+--------+
-- |  5,0   |  5,1   |  5,2   |  5,3   |
-- +--------+--------+--------+--------+
--
-- pages used:
--
-- page 0: global page, controls defined on page 0 will always be available
-- page 1: deck a
-- page 2: deck a / shift held
-- page 3: deck a / slicer active
-- page 4: deck b
-- page 5: deck b / shift held
-- page 6: deck b / slicer active
--

-------------------------------------------------------------------------------
-- a function to allow page changes
-------------------------------------------------------------------------------

function change_page()

	local page

	if deck_toggle == 0 then
		if slicer_a_active == 0 then
			if shift == 0 then
				page = 1
			else
				page = 2
			end
		else
			page = 3
		end
	else
		if slicer_b_active == 0 then
			if shift == 0 then
				page = 4
			else
				page = 5
			end
		else
			page = 6
		end
	end

	--print("CHANGE PAGE ",deck_toggle, shift, slicer_a_active, slicer_a_active, "page="..page)
	set_page("lpd8", page)
end

-------------------------------------------------------------------------------
-- a function to simplify assigning of hotcues
-------------------------------------------------------------------------------

function hotcue(d, e, p, deck, cuenum)

	local set_hotcue = "select_set_store_hotcue_"..cuenum.."_"..deck
	local delete_hotcue = "delete_hotcue_"..cuenum.."_"..deck
	local hotcue_state = "hotcue"..cuenum.."_state_"..deck

	capture(d, e, ALL, p, function(d, e, v, p)

		-- either set/store or delete a hotcue if shift is pressed

		if shift == 0 then
			send("traktor", set_hotcue, v)
		else
			send("traktor", delete_hotcue, v)
		end

		-- the lpd8 turns the led off when u release, keep it on if hotcue is set

		if v == 0 then
			if get("traktor", hotcue_state) > 0 then
				send(d, e, ON, p)
			end
		end
	end)

	-- always send traktors hotcue events back to the pad led

	pipe("traktor", hotcue_state, 0, d, e, p)
end

-------------------------------------------------------------------------------
-- define our layout
-------------------------------------------------------------------------------

--
-- deck change toggle and shift button
--

toggle_modifier("lpd8", "0,3", 0, ON, OFF, "deck_toggle", "change_page")
hold_modifier("lpd8", "3,3", {1, 2, 4, 5}, ON, OFF, "shift", "change_page")

----------------------------------------------------------
-- PAD mode
----------------------------------------------------------

-- attach slicers for deck a and b

id = traktor_slicer("lpd8", grid("2,0", "3,3"), 1, "a", "slicer_a_active", "0,0", "0,1", "0,2", "change_page")
slicer.active_toggle("lpd8", "0,0", 2, id, "slicer_a_active", "change_page")

id = traktor_slicer("lpd8", grid("2,0", "3,3"), 3, "b", "slicer_b_active", "0,0", "0,1", "0,2", "change_page")
slicer.active_toggle("lpd8", "0,0", 4, id, "slicer_b_active", "change_page")


toggle("lpd8", "1,0", {1, 2}, ON, OFF, "traktor", "play_a")
button("lpd8", "1,1", {1, 2}, ON, OFF, "traktor", "cue_a")
toggle("lpd8", "1,2", {1, 2}, ON, OFF, "traktor", "beat_sync_a")

toggle("lpd8", "1,0", {3, 4}, ON, OFF, "traktor", "play_b")
button("lpd8", "1,1", {3, 4}, ON, OFF, "traktor", "cue_b")
toggle("lpd8", "1,2", {3, 4}, ON, OFF, "traktor", "beat_sync_b")

----------------------------------------------------------
-- CC mode (when slicer not active)
----------------------------------------------------------

-- hot cues 1-4 on top row

hotcue("lpd8", "2,0", {1, 2}, "a", 1)
hotcue("lpd8", "2,1", {1, 2}, "a", 2)
hotcue("lpd8", "2,2", {1, 2}, "a", 3)
hotcue("lpd8", "2,3", {1, 2}, "a", 4)

hotcue("lpd8", "2,0", {4, 5}, "b", 1)
hotcue("lpd8", "2,1", {4, 5}, "b", 2)
hotcue("lpd8", "2,2", {4, 5}, "b", 3)
hotcue("lpd8", "2,3", {4, 5}, "b", 4)

-- loop on/off and loop size

toggle("lpd8", "3,0", 1, ON, OFF, "traktor", "loop_active_a")
pipe("lpd8", "3,1", 1, "traktor", "loop_size_dec_a")
pipe("lpd8", "3,2", 1, "traktor", "loop_size_inc_a")

toggle("lpd8", "3,0", 3, ON, OFF, "traktor", "loop_active_b")
pipe("lpd8", "3,1", 3, "traktor", "loop_size_dec_b")
pipe("lpd8", "3,2", 3, "traktor", "loop_size_inc_b")

-- when shift pressed loop+/- pads become pitch bends

pipe("lpd8", "3,1", 2, "traktor", "tempo_bend_down_a")
pipe("lpd8", "3,1", 2, "traktor", "tempo_bend_up_a")

pipe("lpd8", "3,1", 4, "traktor", "tempo_bend_down_b")
pipe("lpd8", "3,1", 4, "traktor", "tempo_bend_up_b")

----------------------------------------------------------
-- PC mode 
----------------------------------------------------------

pipe("lpd8", "4,0", 0, "traktor", "slot_retrigger_c1")
pipe("lpd8", "4,1", 0, "traktor", "slot_retrigger_c2")
pipe("lpd8", "4,2", 0, "traktor", "slot_retrigger_c3")
pipe("lpd8", "4,3", 0, "traktor", "slot_retrigger_c4")
pipe("lpd8", "5,0", 0, "traktor", "slot_retrigger_d1")
pipe("lpd8", "5,1", 0, "traktor", "slot_retrigger_d2")
pipe("lpd8", "5,2", 0, "traktor", "slot_retrigger_d3")
pipe("lpd8", "5,3", 0, "traktor", "slot_retrigger_d4")

----------------------------------------------------------
-- Pots
----------------------------------------------------------

pipe("lpd8", "fader1", 0, "traktor", "eq_low_a")
pipe("lpd8", "fader2", 0, "traktor", "eq_mid_a")
pipe("lpd8", "fader3", 0, "traktor", "eq_high_a")
pipe("lpd8", "fader4", 0, "traktor", "volume_fader_a")
pipe("lpd8", "fader5", 0, "traktor", "eq_low_b")
pipe("lpd8", "fader6", 0, "traktor", "eq_mid_b")
pipe("lpd8", "fader7", 0, "traktor", "eq_high_b")
pipe("lpd8", "fader8", 0, "traktor", "volume_fader_b")
Chasidy Heckenbach
26.08.2011
Originally Posted by safefire
Can't wait to give it a go

I'll be happy to test and give feedback. I'm fairly wizzy on programming, the midi protocol, traktor mapping and 2D / 3D graphics.

If you want a hand with anything (UI design, graphics, layout etc) give me a shout and I'll be happy to help
cheers. you should be able to code as much as u want then for your own needs. the basic core handles low level midi stuff, maintaining caches for different device layers and providing an api etc - but then just calls user lua code.

lua is pretty simple to get into compared to most languages and oddly powerfull.

there's no gui - this is just a router app thats configured by custom lua code - just runs in a cmd shell at the moment.

ofc it would be possible for someone else to write some kind of gui app that creates config code - but that would somewhat defeat the point of it all, being able to do anything that might be wanted. might be an idea tho for what most people would want.

and/or it would be pretty simple to write some code to read a midikatapult config file and emulate it, etc etc
Lewis Stumpf
26.08.2011
Can't wait to give it a go

I'll be happy to test and give feedback. I'm fairly wizzy on programming, the midi protocol, traktor mapping and 2D / 3D graphics.

If you want a hand with anything (UI design, graphics, layout etc) give me a shout and I'll be happy to help
Odilia Gatica
25.08.2011
Can't lose my bass station even tho I don't use it much these days. Wanted a 303 since I was a fetus and this was a dream due to midi etc and the price off 303's of course lol. I used to get the no sound problem and it was always because I changed the midi output to a different one from the onboard synth. I was still young and confused! Lol
Chasidy Heckenbach
25.08.2011
Originally Posted by gingerman
Looking forward to this Zestoi!!!

I've been trying to make a lpd8 midifighter bank on my lpd8, but gave up due to traktor's eye-straining tiny mapping window

It seems others are making apps to get around this (the most respect to people sharing their hard work like you), but i feel that if NI made the mapping window full screen, we could all crack on with mapping goodness instead of giving up with eye-strain lol
cheers - and yep... lets hope they improve the mapping gui really soon...

as for a midifighter on an lpd8.... i already have some code to do that. to either make it emulate a midifighter in normal mode or in 4banks mode - using PAD mode for the top two rows and CC mode for the bottom two.

only problem is i broke that code the other day when i totally rejigged my api, but shouldn't take me long to tweak those functions. will try and fix that before the weekend too.

the rest of the code i have sends out to a "MM to Traktor" virtual midi port (using loopMIDI) but for the midifighter emulation they use their own ports so that then you can just use the vanilla instant grat etc tsi's.

edit: i see you have a bass station... very cool. i used to have one of those. tho i do remember having trouble getting any sound out of it at all at times
Odilia Gatica
25.08.2011
Looking forward to this Zestoi!!!

I've been trying to make a lpd8 midifighter bank on my lpd8, but gave up due to traktor's eye-straining tiny mapping window

It seems others are making apps to get around this (the most respect to people sharing their hard work like you), but i feel that if NI made the mapping window full screen, we could all crack on with mapping goodness instead of giving up with eye-strain lol
Chasidy Heckenbach
25.08.2011
Originally Posted by kostis12345
Really? This keeps getting better and better. Could we hope for a (pre-)beta next week?
barring any maor f*ckups i'll release a version this weekend.

increased latency is my biggest fear ofc - apart from midi loops and crashing the system obviously but so far seems ok. will have to see if it gets worse with more complicated mappings etc i guess.
Jan Manzoni
25.08.2011
Originally Posted by zestoi
no noticable increase that i can tell at the moment and the app eats almost zero cpu which i'm pretty surprised about. esp as i have the output levels and beat phase monitor being pumped into the app etc.

i've done a lot more in lua so far that i had expected to have to write in C++, i'm pretty surprised by how efficient lua seems.
Really? This keeps getting better and better. Could we hope for a (pre-)beta next week?
Chasidy Heckenbach
25.08.2011
Originally Posted by kostis12345
My 2 lpd8 should come next week, can't wait to try the app

EDIT: I almost forgot, how big is the latency increase?
no noticable increase that i can tell at the moment and the app eats almost zero cpu which i'm pretty surprised about. esp as i have the output levels and beat phase monitor being pumped into the app etc.

i've done a lot more in lua so far that i had expected to have to write in C++, i'm pretty surprised by how efficient lua seems.
Jan Manzoni
25.08.2011
My 2 lpd8 should come next week, can't wait to try the app

EDIT: I almost forgot, how big is the latency increase?
Chasidy Heckenbach
25.08.2011
Originally Posted by gingerman
Any news on this app being released Zestoi?
actually yes... was hoping to release a version with an example mapping including a twitch style slicer last weekend but had some issues with leds not being persistent *sometimes* between virtual page/layer switches.

that all works now so will be releasing something with an example mapping for an lpd8 this weekend - tho the slicer isnt perfect yet and sometimes gets confused depending on when u hit a pad - i'll still release a version anyway.

i figure most people have an lpd8 or a launchpad so will release a launchpad version of the same stuff either at the same time or soon after - tho probably wont map all the pads. the point is for people to be able to create their own mappings ofc.

documentation might be sometime afterwards but hopefully there'll be enough example code in the mappings i release for the curious to do their own stuff for any controller.

havent really looked too much at hires midi messages yet - as the only thing i have which sends that out (sort of) is my nanokey for pitchbend.

currently the lpd8 mapping i have uses pad/cc/pc mode to turn it into a 4x6 pad controller, a deck a/b toggle that doubles the layers as well as a shift key that adds more - plus when the slicer is active the buttons in the cc mode are used for that compared to their default roles.

should be enough to demonstrate what it can do anyway. tho its still very *beta*
Odilia Gatica
25.08.2011
Any news on this app being released Zestoi?

<< Back to Post and find Controller MappingsReply

Copyright 2012-2023
DJRANKINGS.ORG n.g.o.
Chuo-ku, Osaka, Japan

Created by Ajaxel CMS

Terms & Privacy