-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping for Traktor Kontrol S4 MK3 #3900
Conversation
Cool, thank you for your courage and effort to get this going! Please rebase on 2.3 because 2.x is no longer supported and the CI builds are broken. |
As a First-time contributor we also need your consent by formally signing the contributor agreement: |
Thanks for the pointers. I'll have to check with my employer on the contributor agreement. |
The contributor agreement should not affect the contract with your employer unless you get paid for your contributions to Mixxx. Mixxx is regular GPLv2 with the addition of an "App Store Exception" that is currently unused afaik, since we don't distribute Mixxx in the App store. |
Thanks for working on this! I've had this controller sitting on my desk for about a year now. I initially intended to use it as an example for rewriting the whole controller mapping system, but that project has been put on the backburner for other priorities. I've been feeling that I'm reaching a creative limit with my current setup (Allen & Heath Xone K2) so I am eager to get this working even if the code is ugly. We have other Mixxx contributors who work for Google so I don't think that should be a problem. |
// NOTES on USB messages in Wireshark ----------------------------------------- | ||
// | ||
// usb.darwin.endpoint_type == 1 is URB_ISOCHRONOUS | ||
// usb.darwin.endpoint_type == 2 is URB_BULK | ||
// usb.darwin.endpoint_type == 3 is URB_INTERRUPT | ||
// | ||
// usb.darwin.request_type == 0 is SUBMITTED | ||
// usb.darwin.request_type == 1 is COMPLETED | ||
// | ||
// usb.darwin.endpoint_address: | ||
// 0x00 - host | ||
// 0x01 - OUT, URB_ISOCHRONOUS, messages of ~22k bytes, ~700 KiB/s | ||
// 0x02 - OUT, URB_INTERRUPT, messages of 11, 41, 79 and 95 bytes (LEDs?) | ||
// 0x03 - OUT, URB_BULK, messages of 153k bytes, ~3 MiB/s | ||
// 0x81 - IN, URB_ISOCHRONOUS messages of ~2k bytes | ||
// 0x82 - IN, URB_ISOCHRONOUS messages of just 4 bytes | ||
// 0x83 - IN, messages 0x01, 0x02, and 0x03, URB_INTERRUPT mode | ||
// | ||
// Wireshark filter for the message3: | ||
// | ||
// usb.darwin.endpoint_address == 0x83 && | ||
// usb.darwin.endpoint_type == 3 && | ||
// ((usb.darwin.io_len == 60 && usb.darwin.request_type == 1) | ||
// || (usb.darwin.io_len == 128 && usb.darwin.request_type == 0))) | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this info to the Reverse Engineering wiki page.
// Mixxx controls, and handling the state of the controller (such as | ||
// decks assignment). | ||
|
||
TraktorS4MK3_alex = new function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TraktorS4MK3_alex = new function() { | |
TraktorS4MK3 = new function() { |
this.partial_packet = data; return; | ||
} | ||
|
||
if (length === 15) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will work on a PR to use the hidraw backend of hidapi on Linux so this isn't needed.
this.addButton(m1, "mixer", "select_fx_1", 0x09, 0x20); | ||
this.addButton(m1, "mixer", "select_fx_2", 0x09, 0x02); | ||
this.addButton(m1, "mixer", "select_fx_3", 0x09, 0x40); | ||
this.addButton(m1, "mixer", "select_fx_4", 0x09, 0x01); | ||
this.addButton(m1, "mixer", "select_fx_filter", 0x09, 0x80); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could target this PR to the main branch for 2.4 so it can use #2618. Alternatively we could leave these unmapped for a 2.3 mapping and add those features in the main branch.
@alexanderchuranov I have started an alternate mapping from scratch in #4056. The pull request is targeted at the main branch and requires using the main branch. In the main branch, we have switched from the deprecated QScriptEngine JS interpreter to QJSEngine which supports ES6 & ES7. Also, the error messages with QJSEngine are much more useful than QScriptEngine. It would be great if we work together on that rather than continue with the really messy legacy common-hid-packet-parser.js library. I have started a new library with ES6 classes modeled on the MIDI Components library which already works for toggling between decks. To use the main branch, you can either build Mixxx yourself or use a prerelase build. |
Closing in favor of #4056. |
It would be great if you could help map the jog wheels in #4056. |
NOTE: This is work in progress. Creating the pull request to receive feedback.