Page 1 of 6

Numark Mixtrack

PostPosted: Mon Oct 25, 2010 7:51 pm
by matteo
Hi everyone,

I recently acquired a Numark Mixtrack Midi controller and was wondering if someone was working on a fully compliant MIDI mapping for using with Mixxx ? I started to play with it under Linux with the Numark Omni Control as a starting point. Even if it is a good start, it is not perfect and before going any further myself, I wanted to know if someone has done something before, like investigating which event to send in order to illuminate the buttons and everything ?

If not, I'm ready to do it. Is the forum the right place to talk about that, or should I rather switch to the devel mailing list ?

Re: Numark Mixtrack

PostPosted: Mon Oct 25, 2010 9:31 pm
by Pegasus
Yes, this subforum is exactly the place. Try searching the subforum for mixtrack and see if anyone else has done something for it.

Re: Numark Mixtrack

PostPosted: Thu Oct 28, 2010 5:17 am
by matteo
Just to give a few news, I've started to work on this mapping and things are turning good.

Right now, I have found, thanks to the instructions on the wiki on how to "sniff" the midi events, all the events that the controller was sending and I'm ready to map all of them properly.

I've also run a full "event scan" on the controller and found all the right events to send in order to switch on and off the leds and buttons.

I will more than likely send a first version of a mapping this week end for beta test.

Re: Numark Mixtrack

PostPosted: Thu Oct 28, 2010 7:19 am
by Pegasus
matteo wrote:I've also run a full "event scan" on the controller and found all the right events to send in order to switch on and off the leds and buttons.

Oooh, how did you do this? I'm interested!

Re: Numark Mixtrack

PostPosted: Thu Oct 28, 2010 7:38 pm
by matteo
Well, really nothing very glamourous... Like a network port scan, it was kind of "brute force", except as I'm starting to discover midi, I'm not as sure of what I'm doing, and my understanding of midi is very limited.

In fact, I studied the mapping from the Numark Omnicontrol as a starting point, to get how the mixxx API and stuff are working and saw that the author of this mapping was sending events with 64 as velocity (not sure of the term...) for turning light on and 00 for lights off. Browsing the amidi command man page I saw it could send midi events, it was a command line interface, so I could script it to make a "port scan" tool, perfect.

So I used amidi, with -S arg for sending triplets of the form 90xx64 to try to turn lights on. With xx starting from 00 to ff. With a very small bit of perl I generated an amidi command with all the midi events (amidi -p .... -S "90 00 64 90 01 64 90 02 64..... 90 ff 64" and all the lights illuminated ! Hurra ! Now... Among all these 256 events I sent, which are the goods one ? First I needed to turn them off, I regenerated a command with all the "velocity" to 00, all the lights turned off, the hint in the Omnicontrol was the good one.

And now, the real problem was that I needed to check "visually" for each command, so I could not script it all the way... And I checked, when a light is turned on (or off), no midi event is sent by the controller... So that was looooooong :) Let's send 900064... no light ? Let's send 900164... no light ? Let's send... etc.

So it was very stupid, and a bit tedious yes :) and... the first working event I sent was 33 (The 51st one !)...

Let's say I was applying a scientific experimental method :D (or just plain old good home hacking...sounds good too)

But once it is done, it is done, and I'm quite happy that it is finished and to have all the references in hand now.

The small bit of perl, just in case it is useful for some one, replace the value of the -p argument with the address of your controller.
It's a one liner, it will print (not execute) a command on the standard output. So execute it in bash, and save the output in a file, to execute it as a script for example.
Code: Select all
perl -e '$cmd = "amidi -p hw:2,0,0 -S "; foreach $i (0..255) { $cmd .= "90 ".sprintf("%02x",$i)." 64 ";} print $cmd."\n";'

Re: Numark Mixtrack

PostPosted: Fri Oct 29, 2010 4:27 am
by Pegasus
Ahh ok I figured you did something like that. That works for simple controllers, but more complex ones sometimes have special features that are accessed through a certain sequence of 3-byte messages, or System Exclusive messages, so for those the MIDI spec will be required.

Re: Numark Mixtrack

PostPosted: Fri Oct 29, 2010 5:22 am
by matteo
Actually I was wondering if it would be possible to sniff the midi bus on an OS point of view like a real network. The thing is supposed to work under windows with a software called Traktor (I do not have a Windows set up at home, so I haven't tried), and I was affraid I would have to do something like sniffing the communication between the windows host and the interface to figure out what information they exchange, thinking that it should not be too complex to figure out... Now that I know, I can confirm that.

I could not find any informations on how to do that sort of stuff. However, I think I understood some make kind of complex set ups with softwares for routing midi events between other softwares. Maybe, these "routers" could be configured to "dump" what they see somewhere ? A Retro-analysis would then be possible, as to my experience in other fields, constructors are frequently reluctant to deliver their full specs to us happy home hackers...

Again, my understanding of everything midi is very limited, I'm discovering all that right now... pardon me if I'm saying anything absurd.

Re: Numark Mixtrack

PostPosted: Fri Oct 29, 2010 6:24 am
by Pegasus
Yes, Bome's MIDI Translator can do that and more, but it's not free. There are other MIDI monitor type programs out there though.

Re: Numark Mixtrack

PostPosted: Mon Nov 01, 2010 4:22 pm
by matteo
Hi, please find attached a first mapping and script file for the controller.
Everything is still not perfect, I know, but I'd be more than happy to improve this according to user feedback. In any case, all the basic functions are implemented and everything needed to start playing is there. Among the points I'm not quite sure on how to implement are:
- The "Stutter" key
- The "1 bar" auto loop key, which I guess is supposed to create a loop of just one bar ?

Many thanks to the person who did the Numark Total Control mapping, the files I'm sending are heavily inspired by his.

Re: Numark Mixtrack

PostPosted: Sun Nov 07, 2010 3:13 pm
by anders
It would be great for Mixxx users if we could get some documentation of our mappings on the wiki, one page per controller, with documentation of how to use the controller with each existing mapping.

I've started out by making a page for the RMX

Please consider documenting this controller as well and link it from hardware compatibility page If you copy from existing pages it's not too much work.