Closed zebebop closed 9 months ago
I have tested my Traktor S3 mapping on a Linux Mint desktop with Mixxx v2.4 and there is no problems. Perhaps a specific Macos Failure...
Could you try if it helps to replace the lines https://github.com/mixxxdj/mixxx/blob/ca8720f8f365853bb80e23714ed89e41b54d536a/res/controllers/Traktor-Kontrol-S3-hid-scripts.js#L290-L303 by the following code:
// Set each InputReport to the bitwise inverted state first,
// and than apply the non-inverted initial state.
// This is done, because the common-hid-packet-parser only triggers
// the callback functions in case of a delta to the previous data.
for (let inputReportIdx = 0x01; inputReportIdx <= 0x02; ++inputReportIdx) {
const reportData = new Uint8Array(controller.getInputReport(inputReportIdx));
this.incomingData([inputReportIdx, ...reportData.map(x => ~x)]);
this.incomingData([inputReportIdx, ...reportData]);
}
Hi, I applied the code patch but it does not work with a slightly different error message. Does version 2.3 that I reinstalled in parallel work well with the v2.3 mapping of my S3? It's really weird, as if on macos there wasn't "the right version of a framework" or something else like that... which fits with the new version of the S3 mapping JS script from v2. 4. This is just a hypothesis, I'm not a coder. Thanks.
Can you try
// Set each InputReport to the bitwise inverted state first,
// and than apply the non-inverted initial state.
// This is done, because the common-hid-packet-parser only triggers
// the callback functions in case of a delta to the previous data.
for (let inputReportIdx = 0x01; inputReportIdx <= 0x02; ++inputReportIdx) {
const reportData = new Uint8Array(controller.getInputReport(inputReportIdx));
TraktorS3.incomingData([inputReportIdx, ...reportData.map(x => ~x)]);
TraktorS3.incomingData([inputReportIdx, ...reportData]);
}
Yes ! It seems to work now. In all, there are no more error messages or deactivation of the mapping. I don't have time to test everything, I have 2 elves to manage today ;) If a few people from the community could validate the patch too that would be cool. In any case, a big thank you to you. Best regards.
Great! Does Mixxx read out the correct knob and fader positions at startup? This is what this code section implements.
Mixxx takes into account the initial positions for the volume sliders A,B,C and D as well as the position of the cross fade. On the other hand, it does not take into account the 2 tempo sliders. I put 1 at the top and the other at the bottom, mixxx saw them both in the middle.
Does this work on your Linux Mint system, with the original code?
I complete it more precisely, all positions are taken into account when starting Mixxx (Gain, EQ x3, FX and Vol) all except the tempo sliders ! For linux ubuntu I was so focused on the disabled mapping problem of S3 that I didn't pay attention... I'll look a little later and let you know. ++
Great! Thanks for testing! I guess this is because the tempo-sliders are mapped to work relative and not absolute - can be configured at the top of the mapping file btw.: https://github.com/mixxxdj/mixxx/blob/d7a769ba4a0753861a3cadab1c592ca953326b60/res/controllers/Traktor-Kontrol-S3-hid-scripts.js#L54-L67
Next, I confirm that a change from True to False allows the pitch fader to take the correct value when starting Mixx and to be able to use the entire scaling range, great!
On Linux Ubuntu, Traktor S3 is recognized directly without applying the patch above. On the other hand, same problem for the pitch fader. So just like on Macos, you just have to change it from True to False! And it's good :)
Edit in SUDO mode of the file at this location: "/usr/share/mixxx/controllers/Traktor-Kontrol-S3-hid-scripts.js"
67 TraktorS3.PitchSliderRelativeMode = true; >>> TraktorS3.PitchSliderRelativeMode = false;
The fix is merged into 2.4 branch and will be part of Mixxx 2.4.1. Thanks for reporting and especially testing!
Bug Description
Hi,
My NI Kontrol S3 mapping doesn't work and is disabled since v2.4 update. Tested on Macbook (intel) MacOS Bigsur and Apple Studio (M2) Sonoma, same results > FAIL.
"Uncaught exception: file:///Applications/Mixxx.app/Contents/Resources/controllers/Traktor-Kontrol-S3-hid-scripts.js:295: TypeError: Property 'from' of object function Uint8Array() { [native code] } is not a function Backtrace: registerInputPackets@file:///Applications/Mixxx.app/Contents/Resources/controllers/Traktor-Kontrol-S3-hid-scripts.js:295 @file:///Applications/Mixxx.app/Contents/Resources/controllers/Traktor-Kontrol-S3-hid-scripts.js:2610"
Version
2.4
OS
MacOS Bigsur (Intel) & Sonoma (ARM)