"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
Chasidy Heckenbach
11.10.2011
just thought of a an odd config... turning my real midifighter (running in normal mode) into a 4banks midifighter via midimasher...

open_midi_device("midifighter1", "generic", "MidiFighter1 Input", "MidiFighter1 Output")
open_midi_device("mfc", "midifighter", "Midi Fighter Classic", "Midi Fighter Classic", 4)
virtual_midifighter_4banks("mfc", 1, "midifighter1", 0, 0, ON, OFF)

not exactly all that useful in itself *but* it sets the midifighter up with 4 midimasher pages... and i can use some buttons on a different controller to change the page of the midifighter by calling set_page("mfc", page)

this means i could have a 4banks midifighter on page 1, a normal mode midifighter on page 2 and as many other pages for mapping anything else that i want.

i thought i might just have a single toggle button on my launchpad that changes the midifighter between pages 1 and 2, one with a 4banks tsi and the other with sample decks stuff or something...
Chasidy Heckenbach
11.10.2011
Originally Posted by Onimode
Code:
button("lp", "0,0", 2 or 3, on_color, off_color, "traktor", "command here")
Using colors from one of zestoi's posts or the launchpad.lua in the devices folder. Commands are in traktor.lua in the same folder. Use 2 or 3 to define the page. :P
yep - exactly here's another example too... as well as specifying a specific page (like 2) or for a control to be on all pages (by saying 0) you can also put a control on just some specific pages..

Code:
button("lp", "0,0", {2, 3}, on_color, off_color, "traktor", "command here")
i suspect that 99% of the time you'd want something on one page or all pages, but you never know...

Edit: So do you plan on adding those APC40 files I sent you to the next build, zestoi?
of course this is exactly what i was hoping would happen - that people would help build up support for extra controllers it now has device support for the apc40 (thanks to you) and the mpd18 (thanks to austin) as well as the ones i own.

i'd also like to collect together more configs from users too as well as any useful extra functions to do stuff that i hadn't though of. i know it's all early days but feels like heading in the right direction now...

the theory is that people can extend it as much as they need - so long as the core code can support that. i'm still a bit shocked at how well the embedded lua seems to perform too...
Kayce Mesia
11.10.2011
Originally Posted by muffintop
How would I add CC data to pages 2 and 3? Just the code for a single momentary button on the top left square button of page 2/3 and I can fill out the rest.

I have a couple ideas for those pages
Code:
button("lp", "0,0", 2 or 3, on_color, off_color, "traktor", "command here")
Using colors from one of zestoi's posts or the launchpad.lua in the devices folder. Commands are in traktor.lua in the same folder. Use 2 or 3 to define the page. :P

Edit: So do you plan on adding those APC40 files I sent you to the next build, zestoi?
Nana Mohs
11.10.2011
How would I add CC data to pages 2 and 3? Just the code for a single momentary button on the top left square button of page 2/3 and I can fill out the rest.

I have a couple ideas for those pages
Chasidy Heckenbach
12.10.2011
Originally Posted by Onimode
I do. I used to make plugins for Counter-Strike 1.6 servers I helped run. Of course that was a few years ago. :P

Also, would making super faders/knobs be possible?
cool i know world of warcraft uses lua for the gui or something. my better half is addicted to that but i can't see her coding any lua somehow

super knobs should be easy to implement. either using capture() to send out various events to traktor directly or as part of the setup for the controller you could make those faders fake the extra events and then use the pipe()/button()/capture()/etc with those as u would do any actual event coming in from the controller.

something like:

Code:
capture("lpd8", "fader1", ALL, 0, function(d, e, v, p)
   if v == 63 then
      create("lpd8", "fader_foo", 0)
   elseif v == 127 then
      create("lpd8", "fader_foo", 127) 
   end
end)
which would then add an extra event called "fader_foo" to the top half of a fader on an lpd8. i guess you'd want to do something more complex than that - but thats the theory anyway... (could be typo's there - i only just typed it into here)

create() basically just fakes input to a controller and it doesn't have to be limitted to the actual midi/events of the controller itself. in devices/traktor.lua there's a function that creates a "heartbeat_a" event from the beatphase monitor using create().
Kayce Mesia
11.10.2011
Originally Posted by zestoi
I do. I used to make plugins for Counter-Strike 1.6 servers I helped run. Of course that was a few years ago. :P

Also, would making super faders/knobs be possible?
Chasidy Heckenbach
11.10.2011
Originally Posted by muffintop
How did you know my next question... Pure genius. I'll test that out after work
cheers lol i'll be testing the normal mode virtual midifighter code toevening anyway and also double checking a couple of things with the 4banks one.

of course the normal mode mf function is only really useful if u want to use a pre-existing tsi file with it. if not it's probably easier to just map 4x4 buttons within midimasher.

also the new twitch like functionality will also let u create any size grid where the top row (or anywhere i guess) is a toggle group for page selecting - and then u can use any midimasher function to map to those sub-pages. that bit of code works mostly - except for some led feedback/refresh.
Chasidy Heckenbach
11.10.2011
Originally Posted by Onimode
Configuring your Midimasher makes me want to go back to pawn coding. :U
that looks pretty cool, you mean http://en.wikipedia.org/wiki/Pawn_%2...g_language%29?

i only actually chose lua when i realised i needed something more dynamic than a simple config file format so hunted around for an embeddable interpreter. i hope lua was the right choice, i believe the syntax is one of the simplest. i hadn't even heard of it until a few months ago.

also i love the fact that u can create functions on the fly... for example saying:

function floob(blah) ...

is only syntactic sugar for this:

floob = function(blah) ...

which means passing functions into functions is uber simple. this is *very* useful for midimasher so you can pass in actions to be run on events etc

Code:
capture("traktor", "play_a", ALL, 0, function(d, e, v, p)
   if v > 0 then
      print "deck a has started"
   else
      print "deck a has stopped"
   end
end)
tho you can also pre-define functions so u can pass in the same one multiple times. any function that takes a callback can also just take the name of the function as a string.
Nana Mohs
11.10.2011
Originally Posted by zestoi
probably a bit silly, but you can have as many normal or 4banks mode virtual mf's as u want, for example this would put two side by side:

Code:
virtual_midifighter_4banks("lp", 1, "midifighter1", 1, 0)
virtual_midifighter_4banks("lp", 1, "midifighter1", 1, 4)
...and probably break the instant grat tsi as they're sharing the same modifiers in traktor ofc but would be more useful if u wanted two normal mode mf's next to each other for different decks. you'd need to create two more virtual midi ports for the second one in that case tho.
How did you know my next question... Pure genius. I'll test that out after work
Kayce Mesia
11.10.2011
Configuring your Midimasher makes me want to go back to pawn coding. :U
Chasidy Heckenbach
11.10.2011
Originally Posted by muffintop
Edit; Thanks a ton! This is fun. Played with it for a few minutes and I really dig it.

I personally would use the midifighter space more if it was not 4 banks mode, but I will mess around with some mapping to make it work for me
probably a bit silly, but you can have as many normal or 4banks mode virtual mf's as u want, for example this would put two side by side:

Code:
virtual_midifighter_4banks("lp", 1, "midifighter1", 1, 0)
virtual_midifighter_4banks("lp", 1, "midifighter1", 1, 4)
...and probably break the instant grat tsi as they're sharing the same modifiers in traktor ofc but would be more useful if u wanted two normal mode mf's next to each other for different decks. you'd need to create two more virtual midi ports for the second one in that case tho.
Chasidy Heckenbach
11.10.2011
for the geek minded... this is the function that caused me to post a link to a new base.lua file but is a good example of creating a function that can be reused using only the base capture() and send() functions.

i needed a function that sent out different events depending on whether a shift button was held down or not and the events would always be sent to the same target, i.e: pitch bend up+down for traktor in the launchpad config but can be used for anything:

Code:
function button_shift(d1, e1, p1, on_color, off_color, d2, e2, e2s, shift, p2)

	if p2 == nil then p2 = 0 end

	capture(d1, e1, ALL, p1, function(d, e, v, p)
		if get(shift) > 0 then
			send(d2, e2s, v, p2)
		else
			send(d2, e2, v, p2)
		end
		if v > 0 then
			send(d1, e1, on_color, p1)
		else
			send(d1, e1, off_color, p1)
		end
	end)

	send(d1, e1, off_color, p1)
end
it just sends different events onto the target device depending on the state of the shift button and sends an approriate message back to the sending device to set the led. the last send() is outside of the capture() so is just run once on startup.
Chasidy Heckenbach
11.10.2011
Originally Posted by muffintop
Edit; Thanks a ton! This is fun. Played with it for a few minutes and I really dig it.

I personally would use the midifighter space more if it was not 4 banks mode, but I will mess around with some mapping to make it work for me
cool cheers

if you mean you would rather it emulated a midifighter in normal mode instead of 4banks mode then i have a function for that too but i haven't checked it since reworking a bunch of the stuff the other week.

in theory it's as simple as changing the call to virtual_midifighter_4banks() to virtual_midifighter() but i'll bet any money that there's bugs in it... i'll have a try later tho.
Chasidy Heckenbach
11.10.2011
Originally Posted by MiL0
that's sweet... amazing that you can do so much with so little code... and code that is reasonably easy to understand too

I wonder how hard it'd be to create a GUI that can spit out the LUA files? I realise it wouldn't allow as much customisation, but it'd be a lot better than using Traktors' mapping window.
cheers tho Onimode just found a buggette with the pitch bend buttons, which use a function i just added the other day and obviously didn't fully test... pitchbend was being triggered but not disabled on button release.

updated file here that needs to be copied to the 'lib' directory to overwrite the old one:

http://djism.com/lua/base.lua

a gui shouldn't be too hard - for a developer that's into coding gui's. most of my work these days is command line stuff for servers or is web based, i haven't coded a real gui in a long long time.

most things can be done using a smallish set of functions, and others could be added for other stuff a gui wanted to do. definately an interesting idea.

of course even a web based gui could spit out a lua file that could then be saved into the right place for midi masher - not ideal - but might be a half way house.

btw... awesome to see your 1000th post on this thread
Arcelia Siebeneck
11.10.2011
Originally Posted by zestoi
for the curious who aren't quite curious enough to download the zip...

this is all the code needed to turn the top right hand launchpad buttons into page selects and create those 4 pages with led recall:

so all in all not too much code - esp as you don't need to mess with traktors control editor if u want to change them...
that's sweet... amazing that you can do so much with so little code... and code that is reasonably easy to understand too

I wonder how hard it'd be to create a GUI that can spit out the LUA files? I realise it wouldn't allow as much customisation, but it'd be a lot better than using Traktors' mapping window.
Nana Mohs
11.10.2011
Originally Posted by zestoi
stuff
Edit; Thanks a ton! This is fun. Played with it for a few minutes and I really dig it.

I personally would use the midifighter space more if it was not 4 banks mode, but I will mess around with some mapping to make it work for me
Chasidy Heckenbach
10.10.2011
for the curious who aren't quite curious enough to download the zip...

this is all the code needed to turn the top right hand launchpad buttons into page selects and create those 4 pages with led recall:

Code:
toggle_group("lp", { "session", "user1", "user2", "mixer" }, 0, lp_hi_yellow, lp_lo_red, "lp_page", function()
    set_page("lp", get("lp_page"))
end)
this creates the basic transport buttons on page one and adds a virtual midifighter:

Code:
toggle("lp", "0,0", 1, lp_hi_yellow, lp_hi_red, "traktor", "play_a")
button("lp", "0,1", 1, lp_hi_yellow, lp_hi_red, "traktor", "cue_a")
toggle("lp", "0,2", 1, lp_hi_green, lp_lo_yellow, "traktor", "beat_sync_a")
button_shift("lp", "0,3", 1, lp_hi_yellow, lp_lo_green, "traktor", "tempo_bend_up_a", "tempo_bend_down_a", "lp_shift")

toggle("lp", "0,4", 1, lp_hi_yellow, lp_hi_red, "traktor", "play_b")
button("lp", "0,5", 1, lp_hi_yellow, lp_hi_red, "traktor", "cue_b")
toggle("lp", "0,6", 1, lp_hi_green, lp_lo_yellow, "traktor", "beat_sync_b")
button_shift("lp", "0,7", 1, lp_hi_yellow, lp_lo_green, "traktor", "tempo_bend_up_b", "tempo_bend_down_b", "lp_shift")

virtual_midifighter_4banks("lp", 1, "midifighter1", 1, 0)
and this adds the kills and virtual faders (ableton style) on page 4:

Code:
toggle("lp", "0,0", 4, lp_hi_red, lp_lo_red, "traktor", "eq_low_kill_a")
toggle("lp", "0,1", 4, lp_hi_red, lp_lo_red, "traktor", "eq_mid_kill_a")
toggle("lp", "0,2", 4, lp_hi_red, lp_lo_red, "traktor", "eq_high_kill_a")

toggle("lp", "0,5", 4, lp_hi_red, lp_lo_red, "traktor", "eq_low_kill_b")
toggle("lp", "0,6", 4, lp_hi_red, lp_lo_red, "traktor", "eq_mid_kill_b")
toggle("lp", "0,7", 4, lp_hi_red, lp_lo_red, "traktor", "eq_high_kill_b")

virtual_yfader("lp", 7, 0, 4, "traktor", "eq_low_a", 7, lp_hi_orange, lp_lo_green, 0, 127)
virtual_yfader("lp", 7, 1, 4, "traktor", "eq_mid_a", 7, lp_hi_orange, lp_lo_green, 0, 127)
virtual_yfader("lp", 7, 2, 4, "traktor", "eq_high_a", 7, lp_hi_orange, lp_lo_green, 0, 127)

virtual_yfader("lp", 7, 3, 4, "traktor", "volume_fader_a", 8, lp_hi_yellow, lp_lo_red, 0, 127)
virtual_yfader("lp", 7, 4, 4, "traktor", "volume_fader_b", 8, lp_hi_yellow, lp_lo_red, 0, 127)

virtual_yfader("lp", 7, 5, 4, "traktor", "eq_low_b", 7, lp_hi_orange, lp_lo_green, 0, 127)
virtual_yfader("lp", 7, 6, 4, "traktor", "eq_mid_b", 7, lp_hi_orange, lp_lo_green, 0, 127)
virtual_yfader("lp", 7, 7, 4, "traktor", "eq_high_b", 7, lp_hi_orange, lp_lo_green, 0, 127)
so all in all not too much code - esp as you don't need to mess with traktors control editor if u want to change them...
Chasidy Heckenbach
10.10.2011
http://djism.com/mm/midimasher-20111011.zip

it doesn't do much yet. what it gives you is...

* 4 pages to map with led recall via buttons session, user1, user2, mixer
* a shift button at bottom right for all pages
* play/cue/sync/pitchbend for decks a+b on the top row of page 1
* a virtual midifighter in 4 banks mode under that one page 1
* bugger all on pages 2+3
* page 4: levels+eq virtual faders and kill toggles

for the bottom 3 rows on page 1 i have *almost* got working some code that gives you two areas that work identically to on the twitch, i.e: 4 page change buttons and 8 buttons per page, that i'll be mapping to similar effects in traktor and eventually my slicer code once i make that work like itch.

i actually tested the build version this time, so 99% sure no files are missing

you should see something like this, after selecting option 2 for launchpad.lua:

Code:
midimasher: build 20111011

#1: default.lua
#2: launchpad.lua
#3: lpd8.lua
#4: lpd8_midifighter_4banks.lua
#5: mpd18_midifighter_4banks.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: MidiFighter1 Input
midi.in.5: MidiFighter1 Output
midi.in.6: 6- Launchpad
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: MidiFighter1 Input
midi.out.6: MidiFighter1 Output
midi.out.7: 6- Launchpad
lua: register functions...
lua: run embedded lua...
loading: lib/startup.lua
loading: config/launchpad.lua
traktor: open midi.in.3: Traktor to MM
traktor: open midi.out.3: MM to Traktor
loading: devices/traktor.lua
midifighter1: open midi.in.4: MidiFighter1 Input
midifighter1: open midi.out.6: MidiFighter1 Output
lp: open midi.in.6: Launchpad
lp: open midi.out.7: Launchpad
loading: devices/launchpad.lua
running... <ctrl>-<c> to quit.
only really releasing now for the insane and curious or possibly curiously insane...

edit: so to edit/mess with this edit the file config/launchpad.lua

edit2: led refresh when changing pages will be faster once i implement the launchpads specific way of doing it, instead of sending out individual midi messages for each pad that needs to be changed
Chasidy Heckenbach
07.10.2011
Originally Posted by chikosneff
EDIT:
Just read that supercombos aren't supported yet.
supercombo's will/should work if using one of the original midifighter class tsi's. the newer midifighter pro ones rely on extra notes being sent out when the super combo's are pressed - but the mf classic doesn't send out those.

also just noticed a mistake of mine:

Code:
toggle("lpd8", "4,0", 0, ON, OFF, "traktor", "play_a")
button("lpd8", "4,1", 0, ON, OFF, "traktor", "cue_a")
the button() one won't work for the PC mode pads on the lpd8, as they only send out data when u press them not release them. so they're a bit limitted. so pretty sure that would start deck A cue'ing but it'd never stop, even when u release it toggles work ok as they dont need any data when u release a pad.

i got lazy and so just mapped them to beatjumps in the other lpd8 config like this:

Code:
pipe("lpd8", "4,0", 0, "traktor", "beatjump_-16_a")
pipe("lpd8", "4,1", 0, "traktor", "beatjump_-8_a")
pipe("lpd8", "4,2", 0, "traktor", "beatjump_+8_a")
pipe("lpd8", "4,3", 0, "traktor", "beatjump_+16_a")
also don't remember if in PC mode the led feedback works properly - probably not...
Chasidy Heckenbach
06.10.2011
Originally Posted by chikosneff
That's awesome I really like your work.
I'm only sad that I will not be able to use it on my gigs because I'm not comfortable with djing on windows, I've got nothing against it but I'm not able to obtain the same low latency that I have on mac os, probably an optimization issue.
I noticed that supercombo no.1 doesn't work, I'm not getting the transpose effect as I press the fourth beatmasher button...
I'll go ahead and test the LPD8 "all in one" configuration
Cheers and congrats again
the "transpose effect" worked here last time i tested it. have you imported the midifighter mappings properly? i believe you need to import via the "big import button", restart traktor and import a 2nd time. the midifighter "classic" tsi doesn't require any extra midi events to trigger the super combo's afaik but the midifighter pro ones do - their firmware sends out different info.

as for the "mac" thing i will solve that sometime. whether i need to buy a mac or buy time on a mac server or something.

thanks again for trying midimasher! your feedback has been really useful... without users input i won't know what i should be adding next

i do need to solve the "mac" issue... personally i hate windows, i'm a linux/unix guy, but at the moment i use windows to run traktor.
Lilliam Keehr
06.10.2011
That's awesome I really like your work.
I'm only sad that I will not be able to use it on my gigs because I'm not comfortable with djing on windows, I've got nothing against it but I'm not able to obtain the same low latency that I have on mac os, probably an optimization issue.
I noticed that supercombo no.1 doesn't work, I'm not getting the transpose effect as I press the fourth beatmasher button...
I'll go ahead and test the LPD8 "all in one" configuration
Cheers and congrats again

EDIT:
Just read that supercombos aren't supported yet.
Chasidy Heckenbach
06.10.2011
Originally Posted by chikosneff
Just finished trying the midimasher with my lpd8 as a virtual midifighter:
it works great, it's just amazing, feels like I have a brand new unit.
Keep up with this great work!
I wish that one day someone will help you bring this beauty to mac os X ;-)
In the meanwhile I'll be djing on bootcamp just to enjoy your work!

Got a few question, hopefully they will be usefull to others:

using the lpd8 as virtual midifighter are the knobs doing the job of the two unavailable rows of buttons?

PROG CHNG button is left un-used?
cheers awesome to know it's worked for someone other than myself the more people use it the better i can make it...

in that config the PC buttons aren't used at all or are the pots but they can be quite easily.

if you import the traktor.tsi file in the 'settings' dir to traktor then you can use the more normal way of controlling any feature in traktor via extra midimasher code. make sure in traktor you connect the in port for the new tsi to MM to Traktor and the out port to Traktor to MM

if you have a look in the config/lpd8.lua file it has this at the end which map the pots of the lpd8 to levels etc - so you can add this to the end of your config/lpd8_midifighter_4banks.lua file - or just create a new .lua file:

Code:
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")
the names of the lpd8 controls are in devices/lpd8.lua and you'll find all the various things you can map to traktor in devices/traktor.lua

the lpd8 PC mode pads are named "4,0" to "4,3" for the top row and "5,0" to "5,3" for the second row.

here's an example of mapping a toggle button to traktor to play deck A and a hold button for cue on deck A:

Code:
toggle("lpd8", "4,0", 0, ON, OFF, "traktor", "play_a")
button("lpd8", "4,1", 0, ON, OFF, "traktor", "cue_a")
the "0" means "all pages", you can map different pages but then u also need a way to switch between them, so just use "0" for now.

ON and OFF refer to what values to send back to the pad when for on and off - the lpd8 only has "on led" or "off led" so ON and OFF work fine (ON is 127 and OFF is 0)

i will write some documentation as to what functions take what arguments sometime... for now the only info is in the file lib/base.lua
Lilliam Keehr
06.10.2011
Just finished trying the midimasher with my lpd8 as a virtual midifighter:
it works great, it's just amazing, feels like I have a brand new unit.
Keep up with this great work!
I wish that one day someone will help you bring this beauty to mac os X ;-)
In the meanwhile I'll be djing on bootcamp just to enjoy your work!

Got a few question, hopefully they will be usefull to others:

using the lpd8 as virtual midifighter are the knobs doing the job of the two unavailable rows of buttons?

PROG CHNG button is left un-used?
Chasidy Heckenbach
07.10.2011
just had a report from chikosneff that there's a bug in the latest version, seems i forgot to include a new lua file in the build script.

until i release a new version (with twitch like features for a launchpad) you need to edit the lib/startup.lua file and delete this line:

require "lib/grid"
Chasidy Heckenbach
02.10.2011
new update:

* ignore any midi message that isn't noteon/noteoff/cc/pc (tho will add in more support when people need it)

* support for akai mpd18 (thanks to austin!) with a "virtual midifighter 4banks config" for it

* new debug.bat - same as midifighter.bat but will also dump to the console all midi+events processing for any debug

* added some missing controls: "sample play secondary" for decks a/b, slots 1,2,3,4 (tho not sure what this control actually does )

* http://djism.com/mm/midimasher-20111003.zip changed url (again) as some new "twitch" style page switching had slipped in...

edit: changed zip name. post 1000... i guess at least it's to do with my midimasher - shame it's not a bigger update tho...
Chasidy Heckenbach
01.10.2011
Originally Posted by austin
The d0 were happening when i held the button which explains why it worked sometimes but only for a second unless it glitched.



any time, ill pm you my email, if you have any more projects you want debugged feel free to contact me.

If you figure out how to fake it upload the code and ill try it out, in the meantime ill be setting up files for the nanopad and get those to you

Cheers
fantastic! and thanks again i'll debug the aftertouch issue tomorrow and release a new version. shouldn't be tricky to fake/debug.
Shasta Utech
01.10.2011
The d0 were happening when i held the button which explains why it worked sometimes but only for a second unless it glitched.



any time, ill pm you my email, if you have any more projects you want debugged feel free to contact me.

If you figure out how to fake it upload the code and ill try it out, in the meantime ill be setting up files for the nanopad and get those to you

Cheers
Chasidy Heckenbach
01.10.2011
Originally Posted by austin
http://imageshack.us/photo/my-images/836/dump.png/

Thats what the dump give me on pushing different keys, ill try out what you sent
the "d0" ones that it doesn't decode are aftertouch... i'll need to fake them and see what it does with them. odd you only had aftertouch after that very first one tho - or maybe thats the only one that you changed pressure on before releasing. anyway that could well be the source of an issue.

massive thanks btw for being one of the first to try this stuff out and helping me debug it etc. much much appreciated
Shasta Utech
01.10.2011
http://imageshack.us/photo/my-images/836/dump.png/

Thats what the dump give me on pushing different keys, ill try out what you sent
Chasidy Heckenbach
01.10.2011
Originally Posted by austin
i got it to actually start playing but its extremly glitchy, its very weird cause the fx on top say they play and the deck sometimes says it does and it will glitch in to where it works and out to where it dosent.


HOWEVER your software is clearly working and im happy to be a part of such an awesome release
cool - cheers

maybe the mpd18 is sending aftertouch or something that is confusing it? i don't actually have anything with aftertouch so not 100% sure if the code would ignore that - or believe it's note/cc/pc data. dump.exe should show what it believes is coming in. if it is something like that and i can see a dump of the data then i'll fix it.

also btw you could map that fader on the mpd18 to something in traktor if you have imported the midimasher.tsi and connected it to the "MM to Traktor" etc ports.

when running learn.exe, after finishing pressing all the pads, you can then move the fader and enter fader (or something else, for the name) and then q to quit.

you can then add something like this to your config file:

pipe("Akai MPD18", "fader", 0, "traktor", "volume_fader_a")

or any other named control you can find in devices/traktor.lua
Shasta Utech
01.10.2011
i got it to actually start playing but its extremly glitchy, its very weird cause the fx on top say they play and the deck sometimes says it does and it will glitch in to where it works and out to where it dosent.


HOWEVER your software is clearly working and im happy to be a part of such an awesome release
Chasidy Heckenbach
01.10.2011
Originally Posted by austin
Fantastic!!! i knew i had to run them in that order but it was just giving hiccups i suppose....

I only have one more problem the fx are triggering but when they trigger it dosnt turn on the fx button by the mixer, so when theyre triggered no effects are played. Any quick fix?
that sounds odd... i do seem to remember something about having to import this tsi, restart traktor and then import it again for it to all work properly or something tho?

at least my "virtual midifighter" stuff *seems* at least to be working for you - just some oddities with the actual mapping used now.

there's no pad led feedback on that akai i guess? not a biggie for this really - just handy seeing which bank you're currently in.

pressing the top left pad should put it in bank1 mode tho (and is in bank1 on startup) - which then should be sending data to the 1st of the 4 tsi's, for deck 'a'. i only have "MF_FX_4Banks[A]" and "[B]" as i deleted the other two - you have all of those setup to use the virtual mf ports?

try the restarting traktor and reimporting from the "big import" button maybe? tho u say that effects are getting triggered - sounds odd that they're just not being enabled for the deck...
Shasta Utech
01.10.2011
Fantastic!!! i knew i had to run them in that order but it was just giving hiccups i suppose....

I only have one more problem the fx are triggering but when they trigger it dosnt turn on the fx button by the mixer, so when theyre triggered no effects are played. Any quick fix?
Chasidy Heckenbach
02.10.2011
Originally Posted by austin
Dump.exe shows some outputs when i press the midi keys so thats a good sign, (just bought it and really had no idea if it worked haha), im running the 4banks tsi 1.0.3 from here, are there any changes i need to make within traktor? possibly in the device manager, i tried switching it to different banks modes and didnt seem to change anything (im a noob).


http://imageshack.us/photo/my-images...difighter.png/

And heres the LUA file for this and ill get you the nanopad2 when i get that working after this.


http://www.filesonic.com/file/2274008564/Akai_MPD18.rar

Cheers!
awesome, thanks for the screenshot - thats a big help - and the rar file ofc

looking at your screenshot it looks like traktor has grabbed the midi ports. i have no idea why it does that but hopefully u just need to exit traktor and midimasher and then run everything in this order:

* run loopMIDI
* run midimasher
* run traktor

there shouldnt be any reason to quit and exit loopMIDI afaik, but that's the overall order that things need to be started in.

once midimasher and then traktor are runnng you can exit midimasher, tweak the config and rerun it as often as u like. for some reason if it doesnt grab the midi ports before starting up traktor initially then the midi ports end up in some odd state. not really sure what/why traktor is touching midi ports that it isn't asked to connect to in the tsi?

assuming those errors go away once u restart things, then u should just be able to connect the "Midifighter1 Output" to the input port of your tsi and the other to the input and it should work...

thanks for the lua files, i'll add those to my next build
Shasta Utech
02.10.2011
Dump.exe shows some outputs when i press the midi keys so thats a good sign, (just bought it and really had no idea if it worked haha), im running the 4banks tsi 1.0.3 from here, are there any changes i need to make within traktor? possibly in the device manager, i tried switching it to different banks modes and didnt seem to change anything (im a noob).


http://imageshack.us/photo/my-images...difighter.png/

And heres the LUA file for this and ill get you the nanopad2 when i get that working after this.


http://www.filesonic.com/file/2274008564/Akai_MPD18.rar

Cheers!
Chasidy Heckenbach
30.09.2011
Originally Posted by austin
All seems successful to the point im at, perhaps im not mapping something properly in traktor im honestly completely new to any type of midi related modding.

it claims no midi device for midi fighter 1 input or output, i do have traktor to mm and mm to traktor running.... am i on the right track? as im actually using an akai MPD18, ive changed all the information from the lpd8 and was able to get midi masher to run. However when i load the instant grat tsi and hit a pad nothing happens. I am using all of ur latest releases of your code

Edit: - Cheers
have you created two virtual midi ports called these?

* MidiFighter1 Input
* MidiFighter1 Output

you actually don't need to have the "Traktor to MM" ones active actually if only using the virtual midifighter port but everything else that uses traktor will - so no harm to keep them.

the virtual midifighter needs these two so it's the only thing sending and receiving to the midifighter tsi.

can u cut&paste what midimasher prints out when u run it? i believe/hope i put just enough info in there for me to make sense of peoples issues.

also - if u kill midimasher and just run 'dump' and select the MPD18 it shows midi data when u press pads? just checking that it is getting raw data.

also when we get this running - any chance u can send me your modified devices/lpd8.lua file for the mpd18?

edit: for uber debug if you run a cmd.exe shell you can then run midimasher like this:

Code:
mm.exe -d -i
which will then dump all and any midi data and events to the console. i'll add in a .bat file in the next version to do that. all midimasher.bat is doing is running "mm.exe -i". you can also do something like "mm.exe -f myconfig.lua" which won't prompt u for which config to load.

edit2: and yep - u are definately on the right track

edit3: if only using the virtual midifighter config u could even remove this line from your config - tho leaving it in is no biggie, as even if u dont have the "Traktor to MM" and "MM to Traktor" ports it'll just show a warning, won't effect anythng:

Code:
open_midi_device("traktor", "traktor", "Traktor to MM", "MM to Traktor", 2);
Shasta Utech
30.09.2011
All seems successful to the point im at, perhaps im not mapping something properly in traktor im honestly completely new to any type of midi related modding.

it claims no midi device for midi fighter 1 input or output, i do have traktor to mm and mm to traktor running.... am i on the right track? as im actually using an akai MPD18, ive changed all the information from the lpd8 and was able to get midi masher to run. However when i load the instant grat tsi and hit a pad nothing happens. I am using all of ur latest releases of your code

Edit: - Cheers
Chasidy Heckenbach
29.09.2011
Originally Posted by austin
Thank you so much for your help ill respond how it went within the next week when i have a chance!
cheers - any feedback (good or bad) will be much appreciated...

it has the ability to replace software like midikatapult and automap and do much more too. plus u only need to hack it's own config files if configuring for traktor you do not need to use the crappy traktor controller editor... (unless u need some feature that i haven't added yet, like normal deck controls for C+D instead of sample decks or if u need to tweak jog wheel params)

all config is in the LUA language - it's not too hard to get into - so can be as simple or as complex as you want/need
Shasta Utech
28.09.2011
Thank you so much for your help ill respond how it went within the next week when i have a chance!
Chasidy Heckenbach
28.09.2011
Originally Posted by austin
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?
you would need to create a device config file which tells it what note/cc etc is sent out by each pad on the nanopad2 and then make a couple of minor tweaks. not too tricky tho...

i guess i would treat the 16 pads as 4 sets of 4 pads instead of 2 rows of 8? this will let the code work with minimal changes...

run learn.exe, enter 'nanopad2' for the device name, 4 for rows and 4 for pads. then it will ask u to press each one, one at a time. so press the first 4 pads on the top row, then the first 4 on the second row, then the 2nd set on the top row and then the final 4 on the 2nd row. press q after that to quit.

once you have this config file you never really need to mess with it again. unless u wanted one that included different internal nanopad banks etc.

i haven't used the learn.exe for a while now, so if something isn't working properly let me know and i'll fix. all it does is create a file called devices/nanopad2.lua that u can edit later if needed.

i presume u mean this for the midifighter 4banks mapping? if so then either edit config/lpd8_midifighter_4banks.lua or copy it to something like config/nanopad2_midifighter_4banks.lua and then change this:

Code:
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 this:

Code:
open_midi_device("traktor", "traktor", "Traktor to MM", "MM to Traktor", 2);
open_midi_device("nanopad2", "nanopad2", "YOUR NANOPAD MIDI DEVICE NAME", "", 2);
open_midi_device("midifighter1", "generic", "MidiFighter1 Input", "MidiFighter1 Output")
virtual_midifighter_4banks("nanopad2", 0, "midifighter1", 0, 0, 0, 127)
the first arg to open_midi_device() is the name u use to reference it anywhere else in the config, the 2nd arg is the type so it knows which file from the "device" dir to load for it, the 3rd arg is the name of it's midi input and 4th is it's midi output (none for the nanopad i presume, so empty) running either dump.exe or learn.exe will list your midi 'in' device names so u can copy from there.

then double click on midimasher and select your config.

it's not as much work as i've made it out here

if it works (and if not i will fix it so it does) can you send me your devices/nanopad2.lua file and the nanokontrol editor config file so i can include those in later releases? it would be cool to build up a set of device config files for anything that's out there to make it easier for people to get started in future.

this is the output of me just checking learn.exe with my lpd8:

Code:
1: From SCS.3 DaRouter
2: LPD8

choose a device: 2
enter the device type (will create devices\TYPE.lua): flibble
writing to [devices\flibble.lua]
Enter the number of grid controller rows (0 for none): 2
Enter the number of grid controller columns: 4
Press pad 1 on row 1
Press pad 2 on row 1
Press pad 3 on row 1
Press pad 4 on row 1
Press pad 1 on row 2
Press pad 2 on row 2
Press pad 3 on row 2
Press pad 4 on row 2
q
i did find a minor issue, if you see it outputting this warning ignore it, tho i will fix it in the next version:

Code:
cygwin warning:
  MS-DOS style path detected: devices\flibble.lua
  Preferred POSIX equivalent is: devices/flibble.lua
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

<< 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