Skip to content
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

Closed

Conversation

alexanderchuranov
Copy link

@alexanderchuranov alexanderchuranov commented May 23, 2021

NOTE: This is work in progress. Creating the pull request to receive feedback.

@uklotzde
Copy link
Contributor

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.

@uklotzde
Copy link
Contributor

As a First-time contributor we also need your consent by formally signing the contributor agreement:

https://docs.google.com/forms/d/e/1FAIpQLScC9QG327sjLL0eWftmfGUasxFFLxg6LCXJ2xHDYRzFIRqyiw/viewform?formkey=dEpYN2NkVEFnWWQzbkFfM0ZYYUZ5X2c6MQ

@alexanderchuranov
Copy link
Author

Thanks for the pointers. I'll have to check with my employer on the contributor agreement.

@uklotzde
Copy link
Contributor

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.

@Be-ing
Copy link
Contributor

Be-ing commented Jun 29, 2021

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.

Comment on lines +860 to +884
// 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)))
//
Copy link
Contributor

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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TraktorS4MK3_alex = new function() {
TraktorS4MK3 = new function() {

this.partial_packet = data; return;
}

if (length === 15) {
Copy link
Contributor

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.

Comment on lines +214 to +218
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);
Copy link
Contributor

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.

@Be-ing
Copy link
Contributor

Be-ing commented Jul 5, 2021

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

@Be-ing
Copy link
Contributor

Be-ing commented Aug 31, 2021

Closing in favor of #4056.

@Be-ing Be-ing closed this Aug 31, 2021
@Be-ing
Copy link
Contributor

Be-ing commented Aug 31, 2021

It would be great if you could help map the jog wheels in #4056.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants