Hack the F1

Home :: General Discussion :: Hack the F1Reply
Hack the F1
Posted on: 30.05.2012 by robert chanda
A few of us decided to get together and set up a project to hack the F1.

Join our GitHub project to hack NI's F1 HID protocol and make a driver that sits between Traktor and your MIDI device. It should make Traktor believe it has an F1 installed and allows your MIDI device to spoof F1 messages to Traktor allowing full access to Traktor's capabilities to MIDI devices.

https://github.com/fatlimey/hack-the-f1

Check the WIKI and download the source docs for more on what we have so far.

Want to join us? Post an email address in this thread (or PM) to keep informed. If you're a coder with the skills, contact us via this thread or PM with your skills and background to get project commit access.

UPDATE:
  • @DJTastyTreats, @djbassbitz, @rglassman1, can you get in touch?
  • Alex, what's your handle on here?
Jeffrey Kappler
25.06.2012
I see you guys have an alpha release since 7 hours ago. Does this actually work in some manner or is it just a proof of concept?
DJ MENSAH
24.06.2012
How I understood Fatlimey is, that middleware (user+kernel level software) is planned in order for user to be able to hack out of the NI's paper bag. Maybe we are not talking about the same thing midifiddler ?
devozz baby
23.06.2012
to further expand on what michael133 said, will this partly be usable on the mfpro's? as in just the midi/hid to launch the sampleslots
Katelyn Hoctor
22.06.2012
will the fimrware be for the MF classic or just the MF3D?
Adolf Hit
22.06.2012
Its a firmware only release, no middle-ware involved, and of course free.
There are no secrets to be hidden, if you have any specific questions about the implementation ask away!
Lilliana Perris
22.06.2012
I believe it will be free, to those who have a MF.

Whether they will open it up totally....no idea.
Brunilda Kora
22.06.2012
Originally Posted by midifidler
Hey DJDoubleYou,

The MF3D Remix deck firmware will be available at some point next week!
Here's a question - will DJTT make the information/knowledge THEY have gained about the Remix Decks available to the community (us)?

Or will they keep it under their hat? Effectively "doing an NI"?
robert chanda
22.06.2012
Sorry for the slow progress people (especially fellow developers), the day job is kicking my ass currently (if I could tell you you'd understand why).

Updates as I flush the todo list, I estimate Wednesday? Ish?
Lashay Walchak
21.06.2012
So after attempting to use DJVC's hack that utilizes Bome's to translate midi>keystroke>mouse click in designated area program with no success I did come across AutoHotKey. I feel like the right script writer could breeze through this, but there would need to be different scripts for different resolutions as the mouse's XY coordinates change.

Someone who's familiar with AHK should jam out a quick keyboard mapping, then leave us user's to do the Bome's translations for our specific controllers.
Vince Donohoue
21.06.2012
Originally Posted by midifidler
Hey DJDoubleYou,

The MF3D Remix deck firmware will be available at some point next week!
Any details on what kind of software release this will be? Is it firmware only, as in pretending to be an F1 from the USB endpoint, or is there middleware involved? If it's the latter case, it seems that there would be redundant work being done.
Werner Bile
21.06.2012
Originally Posted by midifidler
Hey DJDoubleYou,

The MF3D Remix deck firmware will be available at some point next week!
nice!
Adolf Hit
21.06.2012
Hey DJDoubleYou,

The MF3D Remix deck firmware will be available at some point next week!
Era Roka
21.06.2012
How long do you believe it's gonna take?(roughly) cause i'm gonna take a shot for a 3d routine with 50.000 views and i want to use them in a part.
Vince Donohoue
21.06.2012
A HID mouse is a HID mouse because it's a mouse and applications that want to work with HID mice will do so. HID Mouse is a subset of the larger HID standard, which NI is compliant with. If NI made a Kontrol Mouse1, I'm sure they would use the HID Mouse standards.

The standards contain pre-defined types. USB for instance has USB Audio, USB HID, USB Camera, USB Serial com., USB Keyboard/mouse, USB Composite and then you can just have generic bulk and async, data transfers at various speeds. The last USB I worked with just used bulk transfers at a very specific data rate, and it wasn't even USB bulk compliant technically by the strict definitions of the standard.

Also, the F1 does work in MIDI mode, so this argument is completely moot.

The topic is why Traktor will only expose certain features to the F1 that can't be mapped via regular MIDI controllers
There is nothing odd or unethical about the F1.
Yuko Armacost
21.06.2012
Perhaps I am ignorant. I thought HID was largely device specific, is it not?

A HID mouse is universal because every manufacturer uses the same HID paramaters. But non-standard HID controllers like the F1 are only useable by applications that know how to connect to the device. Final Cut will never add the F1 into their supported device lists, for example, so no matter how hard you try you couldn't use it to help edit video.

And I believe it works the other way too. NI developed a set of functions for the F1 that can only be activated by the specific HID data created by the F1. Remix decks should be impossible to use with any other device without rewriting it to match the HID data of the F1.
That sounds proprietary to me.

I understand that HID is quicker than MIDI because HID is always "on" while MIDI requires feedback from the device. I get that HID is better than MIDI for accuracy and expression. But...

I still don't understand. Why HID? What does the F1 do that it needs a hi-res interface? It's just a couple of buttons, sliders and knobs. The Launchpad and other MIDI devices are used by thousands of controllerists who seem to do just fine.
Vince Donohoue
21.06.2012
HID isn't proprietary, it's a standard USB protocol class, and they've made no attempt to obfuscate the data.
It comes down to bandwidth and resolution. HiRes MIDI is kind of a hack and it's a pain in the ass to program with. Running status, variable message size, sys-ex that can interrupt at anytime. It's an outdated protocol.

The F1 basically sends complete status dump with every update and can do so in <1ms with high resolution (16bit vs 7) for each control.

The real issue to be possibly concerned with here is that Traktor only exposes certain parameters to the F1. Interfacing with the F1 itself is actually pretty simple and much less of a headache for the programmer than midi.
Yuko Armacost
21.06.2012
What I want to know is why HID? It doesn't seem like there is a damn thing being done by the F1 that couldn't be done just as well with MIDI. Better even because MIDI is universal. Does anyone else believe NI choose to use HID because of it's proprietary nature? If that is the case what does that say about the company going forward?
Vince Donohoue
20.06.2012
Just a quick update. I spent a couple of hours reading about HID since this is my first time using the HID APIs. Using a Kontrol F1 and a basic command line app in OS X I wrote I'm accessing the device. This is kind of the opposite of what people are trying to do here I guess, which is send messages AS-IF your an F1, but I believe understand how to interface with the F1 natively will allow me to understand how to mimic it.

I'm happy this is all possible in user-space (i.e.; not more driver stuff), so it would be pretty trivial to write an app that uses the F1 as a general controller with HID messaging instead of MIDI. I'm not sure what the benefits of this are over standard MIDI mode for a 3rd party appellation since I haven't actually played with the F1 yet except for this little project.
DJ MENSAH
14.06.2012
Im not sure you can use arduino as a bus sniffer. IMHO, software solution would do just fine, there is no need to get the hardware involved.
Bon Finix
13.06.2012
i'm believeing; is there a possibility to make a hardware solution for this? Using an Arduino and usb host shield or something?!

[edit]
I have enough gear at home to do a proof of concept with my S2. If i can get the Arduino to read the data given by the S2, i know it will also work for the F1.
DJ MENSAH
10.06.2012
Thanks for the heads-up Fatlimey, and thanks for the project. (I'm far to lazy to start hacking something like this)
Can we expect for the tool to be extensible (even if it requires recompiling)? The idea is to try and snatch some of the S4 features.
robert chanda
08.06.2012
We have all been bounced into announcing far too early, so we're trying all kinds of solutions to get the results we want.
This is the "R" part of R&D. The "D" part is when you're supposed to announce...

As the Pirate Radio DJs say, "Hold Tight".
Lauretta Ehrhorn
09.06.2012
Nothing useful to add but good luck to all with this.
Somer Vanstraten
08.06.2012
Any progress? or new people jumping in?
Maude Heifetz
06.06.2012
Originally Posted by Fatlimey
Do you need a driver image? Is it an installed driver or is it standard HID?
I've got the drivers from NI cheers. It's not too bad reverse engineering a driver when you have the hardware but to have to simulate hardware you've never had in order to get the original driver fooled into talking to the simulated device so that you can hack it into not needing the simulated or actual hardware is all a bit of a mind bending excercise. That and two screaming kids in your ear is enough to drive you to drink.

Now where is my beer!!!
robert chanda
06.06.2012
Originally Posted by kearnage
I may try to create a custom wrapper around the F1 drivers to intercept all the info going in and out of it.
Do you need a driver image? Is it an installed driver or is it standard HID?
Maude Heifetz
06.06.2012
I know, it's a Jungle of info. I'm just working on using the device info to spoof the F1 for the moment. I believe as mentioned before the best long term solution is to create a custom driver which talks to Traktor as if an F1 was connected. Much less overhead and will be a lot easier to install for others. I may try to create a custom wrapper around the F1 drivers to intercept all the info going in and out of it. I can then remove the need for the F1 and insert the midi routines to replace the data from the F1. Would all be a lot easier if I had an F1 of course.
robert chanda
07.06.2012
Originally Posted by kearnage
Progress has been slow here, with two ill kids and a lot of dust on the c++ parts of my brain it took a while to get things setup. I've now got the DSF installed and the demos running correctly, got all the data from the GitHub project and Visual Studio fired up and ready to go. Just got to engage the brain now and see what I can come up with.
Come and join me fighting through this wall of documentation. Check the WIKI for the latest HowTos and reading lists.
Maude Heifetz
06.06.2012
Progress has been slow here, with two ill kids and a lot of dust on the c++ parts of my brain it took a while to get things setup. I've now got the DSF installed and the demos running correctly, got all the data from the GitHub project and Visual Studio fired up and ready to go. Just got to engage the brain now and see what I can come up with.
Chasidy Heckenbach
05.06.2012
Originally Posted by JoeM
I haven't done hardware emulation before but it might not be necessary. I haven't looked at IOUSBFamily in a while but I'm hoping it's possible to create a driver bundle that essentially binds to nothing but presents itself as a class compliant HID device, and then create a runloop for CoreMIDI to pass messages back and forth. I've written 2 USB drivers for Mac before but I'm taking a wild guess this would be possible.
that sounds like just what we need i haven't ever done any mac specific stuff before and sounds like you've far more experience with device drivers than me too. i've hacked some things on linux but that was a loooooong time ago.

I'll see if I can start taking a look. I warn you though, we have Nic Fancuili, Joris Voorn, Loco Dice, Pig & Dan, Perc and Dave Clarke all coming to my city this weekend so it might not get a lot of attention just yet.
understood sounds pretty awesome

Oh and the other part, IOUSB is C/C++. If I remember correctly, most of it is C but like CoreAudio it has assistance libraries in C++. I'm a little foggy on that though, I remember AudioToolkit is like this but I can't remember about USB
cool, was hoping for C++ tbh, C would have been my 2nd choice and coming in a far far away 3rd would have been C# only due to what my actual experience is in really.
Vince Donohoue
05.06.2012
I haven't done hardware emulation before but it might not be necessary. I haven't looked at IOUSBFamily in a while but I'm hoping it's possible to create a driver bundle that essentially binds to nothing but presents itself as a class compliant HID device, and then create a runloop for CoreMIDI to pass messages back and forth. I've written 2 USB drivers for Mac before but I'm taking a wild guess this would be possible. I'll see if I can start taking a look. I warn you though, we have Nic Fancuili, Joris Voorn, Loco Dice, Pig & Dan, Perc and Dave Clarke all coming to my city this weekend so it might not get a lot of attention just yet.

Oh and the other part, IOUSB is C/C++. If I remember correctly, most of it is C but like CoreAudio it has assistance libraries in C++. I'm a little foggy on that though, I remember AudioToolkit is like this but I can't remember about USB
Chasidy Heckenbach
05.06.2012
Originally Posted by JoeM
I have a project I would most certainly want to use this with, so as soon as I find the time you can expect either a native Mac emulator or I may do something in Max/MSP since I code in both
if you have any docs/info on creating a virtual hid device for mac i'd love any info you have. ideally C/C++ but i'd take C# too

i have plenty of hid client code already from my midimasher - but just can't find anything related to how to create a virtual hid device on mac that would presented to traktor as though an F1...
Vince Donohoue
05.06.2012
I have a project I would most certainly want to use this with, so as soon as I find the time you can expect either a native Mac emulator or I may do something in Max/MSP since I code in both
Chasidy Heckenbach
05.06.2012
looks awesome - shame still no info for mac. i keep coming up with nothing on that front - just keep finding more articles on linux or windows :P
robert chanda
05.06.2012
Wiki page on GitHub updated to document the development environment. Kids permitting, we should have a forkable codebase by toevening - not a working solution, just a starting point. Don't go getting ahead of ourselves.

https://github.com/fatlimey/hack-the...:-Design-Ideas
Somer Vanstraten
05.06.2012
managed to make X1 work with remix decks on tractor on OSX lion using bome's pro (demo atm).
slot play using bome, meanwhile all the other functions like slot filter and volumes and loops using normal midi mapping in traktor
yep, kinda happy
Somer Vanstraten
05.06.2012
someone known any free midi to mouse movements program for OSX?
Seems that are all for Windows, i wish i could use this solution meanwhile people try to hack the driver.
Maude Heifetz
04.06.2012
I agree. I was hoping to start last evening but kids with colds thought otherwise. I was dusting off the c++/drivers parts of the old grey matter when it also struck me that I had read a thread like this in the past. A quick search later and this popped up

http://community .djranking s.com/showthread.php?t=32001

I've not had chance to catch up on it yet though. It does mention a mapping for the F1 though.

The DJTT work for the 3d looks just the ticket. All the reverse engineering done. Would be nice to get hold of that.
Vince Donohoue
05.06.2012
I'm having a bit of a difficult time tracking the progress here. I'd be willing to help, if there's any work left to do. I've worked on a few USB/MIDI drivers before, including one that was a reverse engineer. It seems like a few of these are using mouse click

What's the deal with the git hub project? There's a little bit of doc but nothing much else on what the next step is.

What's up with the DJTT 3D firmware? Do they have a full reverse engineer? Are they making an HID endpoint that looks like an F1 and routing messages separately?

It looks like it would be pretty easy to setup a fake device driver that translates midi to HID and back.
Winter Ruggio
04.06.2012
looks like 3-4 people did it!!!! thats great,i hope they get jobs at NI like they said....i personally use daws to make custom skratch records,then cue point them in traktor,and X1 for the effects and beats...plus i use a RC-300 for 'fast' creation of ideas.
i would love the sample banks,but the F1 jus for that?....man....we are mad loyal,but we arent all loaded...i understand its 'cheaper' than most,but still,i just dont have the money right now,...maybe inna few months...props to those that cracked it,even if its just a few banks,still....long live the human spirit...

<< Back to General DiscussionReply

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

Created by Ajaxel CMS

Terms & Privacy