Add Support for Native Instruments Traktor Kontrol Hardware
Problem Description
Currently, users with Native Instruments Traktor Kontrol devices (such as the S2) cannot use them plug-and-play with the extension. Because these devices communicate using a proprietary, high-resolution HID protocol (NHL) rather than standard MIDI by default, there are no standard MIDI CC hex codes that we can hardcode into midi_mappings.js.
While users can manually switch the controller to "MIDI Mode", they would still have to manually map every button using the extension's MIDI Learn console because the MIDI output is based on customizable templates in the NI Controller Editor, not a universal standard.
We need to decide on the best approach to provide a seamless "plug-and-play" experience for Traktor Kontrol users.
Proposed Solutions
Option 1: Provide an Official NI Controller Editor Template (MIDI approach)
Create an official ion-youtube-dj.nck template file using the NI Controller Editor. We assign fixed MIDI values to the hardware, hardcode those values into src/midi_mappings.js, and provide the template file in the repository.
Pros:
- Easier to implement on the extension side (reuses the existing
WebMIDI infrastructure).
- No new browser APIs required.
Cons:
- Requires the user to download a template file and manually import it into the Native Instruments Controller Editor software.
- The user has to remember to put their controller into MIDI mode every time.
Option 2: Implement WebHID API Support (Native approach)
Because Chrome supports the WebHID API (navigator.hid), we can update the extension to communicate directly with the hardware's native high-resolution HID protocol, just like Traktor Pro or Mixxx do. We can port the HID parsing logic from the open-source Mixxx repository.
Pros:
- True plug-and-play experience for the user. No templates to download, no software to install.
- The controller doesn't even need to be put into MIDI mode.
- Access to high-resolution faders and proper LED feedback.
Cons:
- Higher development effort. Requires adding
WebHID support to the extension alongside the existing WebMIDI implementation.
- Requires translating Mixxx's HID byte parsing logic into our JavaScript codebase.
Action Items
Add Support for Native Instruments Traktor Kontrol Hardware
Problem Description
Currently, users with Native Instruments Traktor Kontrol devices (such as the S2) cannot use them plug-and-play with the extension. Because these devices communicate using a proprietary, high-resolution HID protocol (NHL) rather than standard MIDI by default, there are no standard MIDI CC hex codes that we can hardcode into
midi_mappings.js.While users can manually switch the controller to "MIDI Mode", they would still have to manually map every button using the extension's MIDI Learn console because the MIDI output is based on customizable templates in the NI Controller Editor, not a universal standard.
We need to decide on the best approach to provide a seamless "plug-and-play" experience for Traktor Kontrol users.
Proposed Solutions
Option 1: Provide an Official NI Controller Editor Template (MIDI approach)
Create an official
ion-youtube-dj.ncktemplate file using the NI Controller Editor. We assign fixed MIDI values to the hardware, hardcode those values intosrc/midi_mappings.js, and provide the template file in the repository.Pros:
WebMIDIinfrastructure).Cons:
Option 2: Implement WebHID API Support (Native approach)
Because Chrome supports the
WebHIDAPI (navigator.hid), we can update the extension to communicate directly with the hardware's native high-resolution HID protocol, just like Traktor Pro or Mixxx do. We can port the HID parsing logic from the open-source Mixxx repository.Pros:
Cons:
WebHIDsupport to the extension alongside the existingWebMIDIimplementation.Action Items
midi_mappings.js.manifest.jsonand background script to supportnavigator.hidand write the parser.