NI Traktor S2 MK2 HID mapping

Everything working except for:

  • Effect lights
  • Remix slots

I’ve been using it for myself but it’d be great if it’s useful for anyone else.
If anyone can help with these missing things and maybe some cleaning up in order to send a PR upstream it’d be great.

(Note: Optimized for Mixxx 2.1)
kontrol_s2_mk2.zip (21.4 KB)

thx

sound interface running?

hello,
my controler is not working with this file.

i have the s2 mk2 controler and have you file unzipped and in the mixxx controler dir! pls help!

i am using: lubuntu and mixxx stable 2.0

You probably need to setup the correct udev rule.

This mapping works great in Linux, but for some reason in Windows only the EQs/fx and faders worked (no buttons, no lights, no jog wheels etc.).

Any ideas?

Refer to this thread, this Zulip conversation, and this pull request.

Thanks!

So am I right in understanding that I could do some similar legwork for the S2 as was done for the S4 in that thread / PR?

I have opened a new pull request trying to fix the issue for the Kontrol S4 Mk2. If you use the modified version of common-hid-packet-parser.js from that pull request and make corresponding changes to this Kontrol S2 Mk2 mapping, I think it should work. But I am still waiting for someone to test if those changes actually work.

I tried doing as you suggested, but as soon as I press anything on the controller I get the following error:

I copied the s4 mapping changes like-for-like except one change where I wasn’t sure what to change the numbers to as they were different in the first place.

The S4:

[code]- packets[0].length = 53;

  • packets[1].length = 63;
  • packets[2].length = 61;
  • packets[0].length = 52;
  • packets[1].length = 62;
  • packets[2].length = 60;[/code]
    but the s2 started off at

packets[0].length = 38; packets[1].length = 33;

I’m not sure what the next step would be but I’m happy to try help.

Hi everyone,

last night I tried out the supplied s2 mk2 mappings file with mixxx and I have to say that all buttons, knobs, etc work perfectly. What is not working at all are all LEDs. So I was wondering if someone has an updated version of the mk2 mapping with working lights!? Or maybe I am missing something to make it work? Did it work for others with the supplied mapping earlier? Would be great to get feedback!

Thanks in advance!

marciano

Some backwards incompatible changes were made for HID mappings with Mixxx 2.2.2 to fix LED output on Windows. Try the script attached and let me know if it works.
Traktor Kontrol S2 Mk2.xml (643 Bytes)
Traktor-Kontrol-S2-MK2-hid-scripts.js (47 KB)

Thanks Be for this option and your help! Sadly I have to admit, that it is not working and even worse: the provided file won’t let me use the controller at all (no reactions).
so for further understanding: i run linux (kde neon) and have mixxx 2.2.2 installed.
I think, the error is communication, as with the older mappings file (almost) everything worked, expect LEDs. Nevertheless, the error thrown always “can’t find variable: Packet”.
No matter the non-usability, the error on button push, using your new mapping file, was this very same error.
What I could find about that is in the common-hid-packet-parser.js file line 646 [within function “”] the only occurance of “Packet” (starting with uppercase P). But I don’t know enough about mapping or controllers to fix that myself.

Since the original post was stating a optimized mapping vor mixxx version 2.1, I was wondering if you think installing this older mixxx version should make it work? Are we sure the older mapping file was working with LEDs?

I would be very happy if you could help me out on this!

Here are two log outputs (running --controllerDebug mode). First one for the older mapping file and the second for the newly provided file by Be.
If anything else is needed for debugging this and solving this LED issue, I am more than happy to help!

Log for older mapping file:

ano@zero:~$ mixxx --controllerDebug
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Warning [Main]: src/skin/legacyskinparser.cpp:2110 SKIN ERROR at skin:tool_bar.xml:344 <Connection>: LegacySkinParser::setupConnections(): EmitOnPressAndRelease must not set false
Warning [Main]: src/skin/legacyskinparser.cpp:2110 SKIN ERROR at skin:skin_settings.xml:40 <Connection>: LegacySkinParser::setupConnections(): EmitOnPressAndRelease must not set false
Debug [Controller]: Opening HID device Traktor Kontrol S2 MK2 C53B_3 by HID path 0002:0005:03
Debug [Controller]:   Starting engine
Warning [Main]: Output sound device clock reference not set! Using "Network stream"
Warning [Main]: "6, Traktor Kontrol S2 MK2: USB Audio (hw:2,0)" not found
Warning []: SoundDeviceNetworkThread: Failed bumping priority
Debug [Controller]: ControllerEngine: Executing TraktorS2MK2 . init
Warning [CachingReaderWorker 11]: SoundSourceMP3 - Recoverable MP3 header decoding error: lost synchronization
Warning [CachingReaderWorker 11]: SoundSourceMP3 - MP3 frame header | layer: 0 mode: 0 #channels: 1 #samples: 36 bitrate: 0 samplerate: 0 flags: "0x0000"
Warning [CachingReaderWorker 11]: SoundSourceMP3 - Recoverable MP3 header decoding error: lost synchronization
Warning [CachingReaderWorker 11]: SoundSourceMP3 - MP3 frame header | layer: 3 mode: 2 #channels: 2 #samples: 36 bitrate: 320000 samplerate: 44100 flags: "0x0008"
Debug [Controller]: HID Invalid offset+pack range 19-20 for 17 byte packet
Debug [Controller]: HID 0
Debug [Controller]: HID 1
Debug [Controller]: HID 2
Debug [Controller]: HID 3
Debug [Controller]: HID 4
Debug [Controller]: HID 0
Debug [Controller]: HID 1
Debug [Controller]: HID 2
Debug [Controller]: HID 3
Debug [Controller]: HID 4
Debug [Controller]: HID ERROR: overwrite non-bitmask control [Channel1].PeakIndicator
Debug [Controller]: HID ERROR: overwrite non-bitmask control [Channel2].PeakIndicator
Debug [Controller]: HID Invalid offset+pack range 35-36 for 33 byte packet
Debug [Controller]: HID Invalid offset+pack range 36-37 for 33 byte packet
Debug [Controller]: Connected ([Channel1], sync_enabled) to connection {133217a5-4f85-4f2d-9050-1dfa613e6aa5}
Debug [Controller]: Connected ([Channel3], sync_enabled) to connection {73e4e201-abd9-4f7e-a98d-5b9ff5916437}
Debug [Controller]: Connected ([Channel2], sync_enabled) to connection {0b641459-98d4-402d-8048-2dc901ffebd5}
Debug [Controller]: Connected ([Channel4], sync_enabled) to connection {94b70c52-fc21-4e8a-a143-feea4dcb8ed0}
Debug [Controller]: Connected ([Channel1], cue_indicator) to connection {b4181dc4-be2d-47bc-a11b-5df44f0e960f}
Debug [Controller]: Connected ([Channel3], cue_indicator) to connection {2a8eb37e-e0d4-4922-822b-2c29c4e6d84f}
Debug [Controller]: Connected ([Channel2], cue_indicator) to connection {29ffe635-644f-41bb-862b-387f4b825605}
Debug [Controller]: Connected ([Channel4], cue_indicator) to connection {0478be07-b855-4aef-b819-6c7eaf311ba9}
Debug [Controller]: Connected ([Channel1], play_indicator) to connection {0c320049-1de5-4eba-a7fa-203f4871fdf0}
Debug [Controller]: Connected ([Channel3], play_indicator) to connection {22ea0d7c-d898-47f5-ac58-2e662b857b3f}
Debug [Controller]: Connected ([Channel2], play_indicator) to connection {12274572-fd6b-44aa-a4d4-592e92776ab7}
Debug [Controller]: Connected ([Channel4], play_indicator) to connection {9a48b8c4-e595-44b4-b007-9a8c60ad48cb}
Debug [Controller]: Connected ([Channel1], hotcue_1_enabled) to connection {4143f0f2-2628-4abf-b704-a254dd2f72f3}
Debug [Controller]: Connected ([Channel3], hotcue_1_enabled) to connection {b3aace78-a531-4554-af7c-e7908e3e3573}
Debug [Controller]: Connected ([Channel2], hotcue_1_enabled) to connection {b3cfe4f7-0ad4-4eae-a94c-a7cbf18bdd6f}
Debug [Controller]: Connected ([Channel4], hotcue_1_enabled) to connection {8cb18bac-602a-4e65-a079-93c26b31ea7b}
Debug [Controller]: Connected ([Channel1], hotcue_2_enabled) to connection {7c924d45-3dc8-4be4-ab2c-f35946158644}
Debug [Controller]: Connected ([Channel3], hotcue_2_enabled) to connection {6e3e558a-20d5-47e9-b00f-ec685cea9ba2}
Debug [Controller]: Connected ([Channel2], hotcue_2_enabled) to connection {ea3c0a2c-d947-4118-9993-6bc37799d47a}
Debug [Controller]: Connected ([Channel4], hotcue_2_enabled) to connection {43dc836d-1eaa-4ea0-ad93-5a009ebfa641}
Debug [Controller]: Connected ([Channel1], hotcue_3_enabled) to connection {87eaa0d0-6e81-428d-b9ae-15a39c427e83}
Debug [Controller]: Connected ([Channel3], hotcue_3_enabled) to connection {73d4c574-973b-4a70-a2a7-7cf75b4a47a1}
Debug [Controller]: Connected ([Channel2], hotcue_3_enabled) to connection {8224f0e2-35d4-4249-af0c-d5769de57d64}
Debug [Controller]: Connected ([Channel4], hotcue_3_enabled) to connection {31006b79-c197-4384-b319-494cbfbd433c}
Debug [Controller]: Connected ([Channel1], hotcue_4_enabled) to connection {757bab30-c907-45f8-a15c-6560fd3cbdbc}
Debug [Controller]: Connected ([Channel3], hotcue_4_enabled) to connection {c180b45b-888e-4141-988f-41d96732ac21}
Debug [Controller]: Connected ([Channel2], hotcue_4_enabled) to connection {97048f20-f0da-46c1-932c-102e630fb963}
Debug [Controller]: Connected ([Channel4], hotcue_4_enabled) to connection {ff74c51d-4855-4df7-b90d-31d688b1d526}
Debug [Controller]: Connected ([Channel1], loop_in) to connection {d591b2ed-5765-494f-987f-0536caa35f05}
Debug [Controller]: Connected ([Channel3], loop_in) to connection {75dc01a0-93f9-4942-840c-e4d8a0842a7d}
Debug [Controller]: Connected ([Channel2], loop_in) to connection {44706075-5b51-4324-9dc4-60e27f989c70}
Debug [Controller]: Connected ([Channel4], loop_in) to connection {c2ac54b2-db71-417b-8647-78cacdf9d039}
Debug [Controller]: Connected ([Channel1], loop_out) to connection {f3df90ca-e4bc-46a3-9c03-53e343c1e13f}
Debug [Controller]: Connected ([Channel3], loop_out) to connection {f6c8058e-4642-44d8-a7fa-164fd41a3c22}
Debug [Controller]: Connected ([Channel2], loop_out) to connection {e57b347f-096e-4cdc-a017-161421e96373}
Debug [Controller]: Connected ([Channel4], loop_out) to connection {388aeca7-249e-41fa-9af6-eadbd29ed02f}
Debug [Controller]: HID Linked output not found: [Channel1].keylock
Debug [Controller]: Connected ([Channel3], keylock) to connection {1f1c84fd-04b3-4ba8-b2d4-b0fd8814344e}
Debug [Controller]: HID Linked output not found: [Channel2].keylock
Debug [Controller]: Connected ([Channel4], keylock) to connection {f4f09afb-0f60-499c-9ec9-de63d59e43ff}
Debug [Controller]: HID Linked output not found: [Channel1].LoadSelectedTrack
Debug [Controller]: Connected ([Channel3], LoadSelectedTrack) to connection {3dfdbd6f-a373-4f59-ab5e-94a2cec8a448}
Debug [Controller]: HID Linked output not found: [Channel2].LoadSelectedTrack
Debug [Controller]: Connected ([Channel4], LoadSelectedTrack) to connection {9fd56c83-a211-421d-8c1f-4df9c2bb33e4}
Debug [Controller]: HID Linked output not found: [Channel1].slip_enabled
Debug [Controller]: Connected ([Channel3], slip_enabled) to connection {9569ddc2-135f-46fd-a3d4-061f9101dcca}
Debug [Controller]: HID Linked output not found: [Channel2].slip_enabled
Debug [Controller]: Connected ([Channel4], slip_enabled) to connection {eb9e8ca3-2d61-4e90-b333-1d9a31534dd5}
Debug [Controller]: Connected ([Channel1], pfl) to connection {7e8ffdce-42d5-49d1-85a2-e7ca182df1cc}
Debug [Controller]: Connected ([Channel2], pfl) to connection {ef72fe91-6b0c-44dc-b4f7-94c240eec4c9}
Debug [Controller]: HID Linked output not found: [Channel1].track_samples
Debug [Controller]: HID Linked output not found: [Channel2].track_samples
Debug [Controller]: HID Linked output not found: [Channel1].PeakIndicator
Debug [Controller]: HID Linked output not found: [Channel2].PeakIndicator
Debug [Controller]: HID Linked output not found: [Master].PeakIndicatorL
Debug [Controller]: HID Linked output not found: [Master].PeakIndicatorR
Debug [Controller]: Connected ([EffectRack1_EffectUnit1], group_[Channel1]_enable) to connection {652f691b-1251-4db3-b749-f07e21880294}
Debug [Controller]: Connected ([EffectRack1_EffectUnit2], group_[Channel1]_enable) to connection {ec96818a-1dd2-4f32-a5ff-7224dfd1aadb}
Debug [Controller]: Connected ([EffectRack1_EffectUnit1], group_[Channel2]_enable) to connection {abb7d94e-b093-4cc7-b36f-8283767b3e1f}
Debug [Controller]: Connected ([EffectRack1_EffectUnit2], group_[Channel2]_enable) to connection {4d1eca87-1d6f-4658-8025-2d657b123e80}
Debug [Controller]: HID Linked output not found: [EffectRack1_EffectUnit1_Effect1].enabled
Debug [Controller]: HID Linked output not found: [EffectRack1_EffectUnit1].next_chain
Debug [Controller]: HID Linked output not found: [EffectRack1_EffectUnit2].next_chain
Debug [Controller]: HID Linked output not found: [Preview[Channel1]].play_indicator
Debug [Controller]: HID Linked output not found: [InternalClock].sync_master
Debug [Controller]: Connected ([Channel1], VuMeter) to connection {14e1993e-44dd-48b6-b558-648659cc5466}
Debug [Controller]: Connected ([Channel2], VuMeter) to connection {367a21a1-a1ed-4fd3-852c-84605bc5862b}
Debug [Controller]: Connected ([Channel1], loop_enabled) to connection {43fa3aa9-97c3-4270-85a2-ccb387e0012d}
Debug [Controller]: Connected ([Channel2], loop_enabled) to connection {a06139e5-a381-4a34-979a-c6083c5d1fa6}
Debug [Controller]: HID setOutput: unknown field: [Master].!quantize
Debug [Controller]: Traktor Kontrol S2 MK2 C53B_3: t:2407 ms, 17 bytes:
01 FF 03 00  00 FF 03 00  00 00 00 00  00 00 00 00
00 
Debug [Controller]: Traktor Kontrol S2 MK2 C53B_3: t:2407 ms, 51 bytes:
02 FF FF FF  FF 01 00 25  0A 11 08 38  06 DC 07 C2
07 FE 0F 6B  0A 66 0B D4  07 E5 07 D3  07 08 08 DC
07 04 08 06  08 DE 07 E2  07 F1 07 01  00 09 08 02
08 D7 07 
...
Warning [Controller]: ControllerEngine: Invocation of connection  "{b4181dc4-be2d-47bc-a11b-5df44f0e960f}" "connected to ([Channel1], cue_indicator) failed:" "ReferenceError: Can't find variable: Packet"

Log for newer mapping file:


llerDebug
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Warning [Main]: src/skin/legacyskinparser.cpp:2110 SKIN ERROR at skin:tool_bar.xml:344 <Connection>: LegacySkinParser::setupConnections(): EmitOnPressAndRelease must not set false
Warning [Main]: src/skin/legacyskinparser.cpp:2110 SKIN ERROR at skin:skin_settings.xml:40 <Connection>: LegacySkinParser::setupConnections(): EmitOnPressAndRelease must not set false
Warning [CachingReaderWorker 11]: SoundSourceMP3 - Recoverable MP3 header decoding error: lost synchronization
Warning [CachingReaderWorker 11]: SoundSourceMP3 - MP3 frame header | layer: 0 mode: 0 #channels: 1 #samples: 36 bitrate: 0 samplerate: 0 flags: "0x0000"
Warning [CachingReaderWorker 11]: SoundSourceMP3 - Recoverable MP3 header decoding error: lost synchronization
Warning [CachingReaderWorker 11]: SoundSourceMP3 - MP3 frame header | layer: 3 mode: 2 #channels: 2 #samples: 36 bitrate: 320000 samplerate: 44100 flags: "0x0008"
Warning [AnalyzerQueue 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: lost synchronization
Warning [AnalyzerQueue 1]: SoundSourceMP3 - MP3 frame header | layer: 0 mode: 0 #channels: 1 #samples: 36 bitrate: 0 samplerate: 0 flags: "0x0000"
Warning [AnalyzerQueue 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: lost synchronization
Warning [AnalyzerQueue 1]: SoundSourceMP3 - MP3 frame header | layer: 3 mode: 2 #channels: 2 #samples: 36 bitrate: 320000 samplerate: 44100 flags: "0x0008"
Debug [Controller]: Opening HID device Traktor Kontrol S2 MK2 C53B_3 by HID path 0002:0006:03
Debug [Controller]:   Starting engine
Debug [Controller]: ControllerEngine: Executing TraktorS2MK2 . init
Debug [Controller]: HID 0
Debug [Controller]: HID 1
Debug [Controller]: HID 2
Debug [Controller]: HID 3
Debug [Controller]: HID 4
Debug [Controller]: HID 0
Debug [Controller]: HID 1
Debug [Controller]: HID 2
Debug [Controller]: HID 3
Debug [Controller]: HID 4
Debug [Controller]: HID ERROR: overwrite non-bitmask control [Channel1].PeakIndicator
Debug [Controller]: HID ERROR: overwrite non-bitmask control [Channel2].PeakIndicator
Debug [Controller]: Connected ([Channel1], sync_enabled) to connection {1ca82c4f-dd3b-4818-8317-bd119349ba7d}
Debug [Controller]: Connected ([Channel3], sync_enabled) to connection {7efe27c5-1959-4ece-ab80-9cb61446c699}
Debug [Controller]: Connected ([Channel2], sync_enabled) to connection {6189c005-c8ad-4a53-a9b8-9cee692ab05d}
Debug [Controller]: Connected ([Channel4], sync_enabled) to connection {319f201a-965f-48b4-94b9-340809a97dfa}
Debug [Controller]: Connected ([Channel1], cue_indicator) to connection {b56bba64-0354-42e0-9e01-56571d3c8563}
Debug [Controller]: Connected ([Channel3], cue_indicator) to connection {5b3c7acc-ad32-4656-9a6b-c58a8a2964db}
Debug [Controller]: Connected ([Channel2], cue_indicator) to connection {84a978db-b594-4764-8d47-a7fccf4801a1}
Debug [Controller]: Connected ([Channel4], cue_indicator) to connection {44ac724f-8928-4ada-8afd-1a1e931492c0}
Debug [Controller]: Connected ([Channel1], play_indicator) to connection {158714f8-93f0-4a0a-8106-10b09928acdf}
Debug [Controller]: Connected ([Channel3], play_indicator) to connection {54bb7e53-3135-43a8-bc38-032ae04175cb}
Debug [Controller]: Connected ([Channel2], play_indicator) to connection {ff066425-c5f3-4326-91f7-a917d42d704f}
Debug [Controller]: Connected ([Channel4], play_indicator) to connection {be4d5229-ff8b-478f-9c0d-d1047877a518}
Debug [Controller]: Connected ([Channel1], hotcue_1_enabled) to connection {c5f6d9ed-4c28-463a-b52b-28a31f415d45}
Debug [Controller]: Connected ([Channel3], hotcue_1_enabled) to connection {30170197-fc4d-4c0d-bdad-931bf4e7185f}
Debug [Controller]: Connected ([Channel2], hotcue_1_enabled) to connection {2e0d59c3-1b8b-41cb-8f9b-fbe4735c72ec}
Debug [Controller]: Connected ([Channel4], hotcue_1_enabled) to connection {b1786976-f9d2-4e90-a950-8dea81bd90bb}
Debug [Controller]: Connected ([Channel1], hotcue_2_enabled) to connection {1428ae0e-5678-4b85-900f-07f3af9dbda0}
Debug [Controller]: Connected ([Channel3], hotcue_2_enabled) to connection {ea3d0328-712d-4678-9267-5ab977aa7f38}
Debug [Controller]: Connected ([Channel2], hotcue_2_enabled) to connection {78bcb1b3-9df5-4564-a877-2de0a6d12483}
Debug [Controller]: Connected ([Channel4], hotcue_2_enabled) to connection {3b54450e-efae-4777-a625-f69ac139bb11}
Debug [Controller]: Connected ([Channel1], hotcue_3_enabled) to connection {dac3b8b7-75c4-4e95-86e6-c584eb903fe7}
Debug [Controller]: Connected ([Channel3], hotcue_3_enabled) to connection {d3aef263-4e82-4191-a708-a09d7fe09169}
Debug [Controller]: Connected ([Channel2], hotcue_3_enabled) to connection {c8ffcf3b-0402-4a29-8c3a-7431ba3b7688}
Debug [Controller]: Connected ([Channel4], hotcue_3_enabled) to connection {bba9f675-8186-4063-ac13-2db12043ed74}
Debug [Controller]: Connected ([Channel1], hotcue_4_enabled) to connection {220501b6-3aa3-4fe9-92b6-524dc8d4fc1f}
Debug [Controller]: Connected ([Channel3], hotcue_4_enabled) to connection {320bcf5e-0d3c-4ee4-a388-f2f33a65f1f2}
Debug [Controller]: Connected ([Channel2], hotcue_4_enabled) to connection {fab4daa8-d073-46de-8261-a43c564f1820}
Debug [Controller]: Connected ([Channel4], hotcue_4_enabled) to connection {a0865973-0b75-4d0d-ae6e-db7b59a6421b}
Debug [Controller]: Connected ([Channel1], loop_in) to connection {828031b5-70ca-4349-a123-070907d693d9}
Debug [Controller]: Connected ([Channel3], loop_in) to connection {bba3014d-55df-4029-b293-407af23712fb}
Debug [Controller]: Connected ([Channel2], loop_in) to connection {be22b15e-1ba5-4464-b807-07e9150a7434}
Debug [Controller]: Connected ([Channel4], loop_in) to connection {2d9931f4-8b72-473b-879c-1185d7af8137}
Debug [Controller]: Connected ([Channel1], loop_out) to connection {797d1150-8b54-43f5-9905-300bef38c6cb}
Debug [Controller]: Connected ([Channel3], loop_out) to connection {a930b1ff-d89e-4294-80c2-0b04bd8a2b99}
Debug [Controller]: Connected ([Channel2], loop_out) to connection {ab777019-6826-4d46-ae28-af300eaad345}
Debug [Controller]: Connected ([Channel4], loop_out) to connection {69d24c26-799a-4caf-9afa-56bcf62cb42b}
Debug [Controller]: HID Linked output not found: [Channel1].keylock
Debug [Controller]: Connected ([Channel3], keylock) to connection {ef1b0518-cc1c-482e-aa3e-7d1257bbcd7e}
Debug [Controller]: HID Linked output not found: [Channel2].keylock
Debug [Controller]: Connected ([Channel4], keylock) to connection {d15df976-07a4-4321-a37a-aaac74ad98c4}
Debug [Controller]: HID Linked output not found: [Channel1].LoadSelectedTrack
Debug [Controller]: Connected ([Channel3], LoadSelectedTrack) to connection {7fc2d15b-6697-4fb8-8124-23bf3c312638}
Debug [Controller]: HID Linked output not found: [Channel2].LoadSelectedTrack
Debug [Controller]: Connected ([Channel4], LoadSelectedTrack) to connection {d7dd5681-0b07-4ba1-aeb1-7a4b95d8ec6e}
Debug [Controller]: HID Linked output not found: [Channel1].slip_enabled
Debug [Controller]: Connected ([Channel3], slip_enabled) to connection {4f082df1-ebc4-40fe-a966-74f44ba66c8a}
Debug [Controller]: HID Linked output not found: [Channel2].slip_enabled
Debug [Controller]: Connected ([Channel4], slip_enabled) to connection {ffde7e49-bcf0-4b74-8bbb-ab600672e99c}
Debug [Controller]: Connected ([Channel1], pfl) to connection {034355b9-6855-4c40-b168-79fac7fcaa74}
Debug [Controller]: Connected ([Channel2], pfl) to connection {00cf0e01-59a3-4fe8-85e8-46a526e72e92}
Debug [Controller]: HID Linked output not found: [Channel1].track_samples
Debug [Controller]: HID Linked output not found: [Channel2].track_samples
Debug [Controller]: HID Linked output not found: [Channel1].PeakIndicator
Debug [Controller]: HID Linked output not found: [Channel2].PeakIndicator
Debug [Controller]: HID Linked output not found: [Master].PeakIndicatorL
Debug [Controller]: HID Linked output not found: [Master].PeakIndicatorR
Debug [Controller]: Connected ([EffectRack1_EffectUnit1], group_[Channel1]_enable) to connection {6bfcc278-865d-402e-95ff-0369d0ae0593}
Debug [Controller]: Connected ([EffectRack1_EffectUnit2], group_[Channel1]_enable) to connection {d274634a-7bd2-4d39-9ec0-6caf4a38834e}
Debug [Controller]: Connected ([EffectRack1_EffectUnit1], group_[Channel2]_enable) to connection {7c343de0-6100-43d5-aa59-38fb3b5dd9be}
Debug [Controller]: Connected ([EffectRack1_EffectUnit2], group_[Channel2]_enable) to connection {9fe2e69e-fc3a-4cd0-b345-887a3696c83d}
Debug [Controller]: HID Linked output not found: [EffectRack1_EffectUnit1_Effect1].enabled
Debug [Controller]: HID Linked output not found: [EffectRack1_EffectUnit1].next_chain
Debug [Controller]: HID Linked output not found: [EffectRack1_EffectUnit2].next_chain
Debug [Controller]: HID Linked output not found: [Preview[Channel1]].play_indicator
Debug [Controller]: HID Linked output not found: [InternalClock].sync_master
Debug [Controller]: Connected ([Channel1], VuMeter) to connection {a5eb4633-b0a5-40b0-b445-66249dc0840b}
Debug [Controller]: Connected ([Channel2], VuMeter) to connection {c4283132-9047-4f77-bd8e-17f41791169d}
Debug [Controller]: Connected ([Channel1], loop_enabled) to connection {0c7b1e14-038f-417f-bbe8-691a933c7fcb}
Debug [Controller]: Connected ([Channel2], loop_enabled) to connection {d1eac660-4b1c-451d-a6ba-4fbcb5dc0e3d}
Debug [Controller]: HID setOutput: unknown field: [Master].!quantize
Debug [Controller]: Traktor Kontrol S2 MK2 C53B_3: t:21104 ms, 17 bytes:
01 FF 03 00  00 FF 03 00  00 00 00 00  00 00 00 00
00 
Debug [Controller]: HID Received unknown packet of 17 bytes
Debug [Controller]: HID BYTE 1
Debug [Controller]: HID BYTE 255
Debug [Controller]: HID BYTE 3
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 255
Debug [Controller]: HID BYTE 3
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 0
Debug [Controller]: Traktor Kontrol S2 MK2 C53B_3: t:21104 ms, 51 bytes:
02 FF FF FF  FF 01 00 25  0A 12 08 38  06 DB 07 C3
07 FE 0F 6A  0A 65 0B D4  07 E6 07 D4  07 08 08 DB
07 03 08 07  08 DE 07 E3  07 F1 07 01  00 08 08 02
08 D7 07 
Debug [Controller]: HID Received unknown packet of 51 bytes
Debug [Controller]: HID BYTE 2
Debug [Controller]: HID BYTE 255
Debug [Controller]: HID BYTE 255
Debug [Controller]: HID BYTE 255
Debug [Controller]: HID BYTE 255
Debug [Controller]: HID BYTE 1
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 37
Debug [Controller]: HID BYTE 10
Debug [Controller]: HID BYTE 18
Debug [Controller]: HID BYTE 8
Debug [Controller]: HID BYTE 56
Debug [Controller]: HID BYTE 6
Debug [Controller]: HID BYTE 219
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 195
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 254
Debug [Controller]: HID BYTE 15
Debug [Controller]: HID BYTE 106
Debug [Controller]: HID BYTE 10
Debug [Controller]: HID BYTE 101
Debug [Controller]: HID BYTE 11
Debug [Controller]: HID BYTE 212
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 230
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 212
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 8
Debug [Controller]: HID BYTE 8
Debug [Controller]: HID BYTE 219
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 3
Debug [Controller]: HID BYTE 8
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 8
Debug [Controller]: HID BYTE 222
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 227
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 241
Debug [Controller]: HID BYTE 7
Debug [Controller]: HID BYTE 1
Debug [Controller]: HID BYTE 0
Debug [Controller]: HID BYTE 8
Debug [Controller]: HID BYTE 8
Debug [Controller]: HID BYTE 2
Debug [Controller]: HID BYTE 8
Debug [Controller]: HID BYTE 215
Debug [Controller]: HID BYTE 7
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: lost synchronization
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 0 mode: 0 #channels: 1 #samples: 36 bitrate: 0 samplerate: 0 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 0 #channels: 1 #samples: 12 bitrate: 96000 samplerate: 32000 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 0 #channels: 1 #samples: 12 bitrate: 96000 samplerate: 32000 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 0 #channels: 1 #samples: 12 bitrate: 96000 samplerate: 32000 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 0 #channels: 1 #samples: 12 bitrate: 96000 samplerate: 32000 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: reserved sample frequency value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 3 mode: 1 #channels: 2 #samples: 36 bitrate: 96000 samplerate: 44100 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 1 #channels: 2 #samples: 12 bitrate: 96000 samplerate: 44100 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 1 #channels: 2 #samples: 12 bitrate: 18079000 samplerate: 44100 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 1 #channels: 2 #samples: 12 bitrate: 18079000 samplerate: 44100 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 1 #channels: 2 #samples: 12 bitrate: 18079000 samplerate: 44100 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 1 #channels: 2 #samples: 12 bitrate: 18079000 samplerate: 44100 flags: "0x0000"
Warning [CachingReaderWorker 1]: SoundSourceMP3 - Recoverable MP3 header decoding error: forbidden bitrate value
Warning [CachingReaderWorker 1]: SoundSourceMP3 - MP3 frame header | layer: 1 mode: 1 #channels: 2 #samples: 12 bitrate: 18079000 samplerate: 44100 flags: "0x0000"
Warning [Controller]: ControllerEngine: Invocation of connection  "{c5f6d9ed-4c28-463a-b52b-28a31f415d45}" "connected to ([Channel1], hotcue_1_enabled) failed:" "ReferenceError: Can't find variable: Packet"

Try deleting all files in ~/.mixxx/controllers, copying the script I attached above to ~/.mixxx/controllers, then re-enabling the mapping.

Be…thank you so much! I actually was just just trying around with the ides that my common-hid-packet-parser.js file was corresponding to the old mixxx version (2.1) and so I deleted it and copied the recent version to the folder ~/.mixxx/controllers. And it worked!!! :slight_smile:
I guess this is the same as you just suggested, where it will use the “system file” from mixxx. great! thank you again for your great help!!

I have a follow up question: I would like to inlcude a physical button which is still not mapped. As I am new to this, how would I approach that? I know about coding, functions (but in different languages) and I had a look into the mapping-js fle in the last days. So I got a basic idea but still no real clue. I know I have to get the hid packet “adress”, but no idea how to extract that from the log output. E.g. when I press a buttom and see for example Debug [Controller]: Traktor Kontrol S2 MK2 C53B_3: t:2596099 ms, 17 bytes: 01 A7 B6 44 0D 96 47 F7 0C 00 00 00 00 00 00 00 00
, how can I translate that to the 4 digit adress used? Btw, there is the need for a shift+desired button combination, as the physical key originally works. But I guess this doesnt really matter as I could re-map it the way I want, right?

And how do I have to include a “function for the button” in the js-file?

Is there a nice guide for that? (I couldn’t find any, although reading through the scripting section in mixxx-wiki)
Or is it just a couple of this for “copy-pasting-modifying” already existing functions within the js-file?

Any help would be much appreciated!
Thanks again man!

I’m trying to get the Traktor Kontrol S2 MK2 to work with the latest version of Mixxx (currently that’s the v2.2.3 of the master branch on the github repository which is built with CMake) on Linux.

To get it to work with v2.2.3 I had to:

  • Edit the file /etc/udev/rules.d/mixxx.usb.rules so that under # Native Instruments it says: ATTRS{idVendor}==“17cc”, GROUP=“YOUR_USERNAME”, MODE=“0660”

  • Download the two files from here

  • Rename the file Traktor Kontrol S2 Mk2.xml to Traktor_Kontrol_S2_MK2_ID_ID.hid.xml. Where the ID_ID gets displayed under Controllers in the preferences or in the console when running mixxx --controllerDebug. Maybe you need to Query Devices under Hardware Setup first. Maybe this step isn’t necessary.

  • Copy the two files into ~/.mixxx/controllers/

  • Copy the file common-hid-packet-parser.js into that same directory. However, this isn’t the latest version you can find in the folder res/controllers/ of the installation. It’s an older version which starts with // Common HID script. I could upload this file and attach it here but you can probably find it in the forums or just download an older version of mixxx and copy it from there. It didn’t work after removing the file or with the latest version of it.

I’m not sure if all of this was necessary to get it working. It’s probably what you need to do to get it working.

Here is how the preferences look like in the versions that worked:

Version of github master branch on April 22, 2020

Doesn’t detect any buttons pressed. This is the error message displayed with the same files in ~/.mixxx/controllers/ as with the other versions:

It also didn’t show the option for the S2 MK2 under Load Preset in the controller options until I removed all files from that directory and pasted them in before restarting mixxx. This error doesn’t show with the latest version of common-hid-packet-parser.js but then it still doesn’t detect the buttons pressed.

It also doesn’t have a Scripts tab under the controller settings.

Version 2.2.3

It works with this version. After the first button-press I’m getting this error message:

However, the effects of FX1 get applied to both playing sides even when the FX1 effect rack is disabled. But one can still disable the FX2 rack. When FX1 is enabled it doubles the intensity of the effect.

Version 2.2.2 (build 2.2 r6728)

Same as above.

Version 2.2.2 (build 2.2 r6726)

This version works but it doesn’t have the problem with the always-enabled FX1. I’m using this version on another computer (with the same files under ~/.mixxx/controllers). It’s not a stable release.


Furthermore the lights of the controller’s effect knobs don’t turn on. They are permanently switched on when using the S2 MK3 mapping so maybe it could be used to fix this problem. However, the two mappings can’t be compared easily with a diff viewer.

Error messages in the console:

Lastly I’m also interested if there is a guide that explains how to edit the mapping to add new functionality (listing the button-IDs, the places to change them and the functionalities to map them to). For example it would be nice to change the effect of an effect knob by holding shift and turning the knob and to always have a filter when holding shift and turning the gain knob.

In short: please reply if there is a newer version with compatibility between the mapping and the latest common-hid-packet-parser, or when the S2 MK2 mapping gets bundled with mixxx, or if the effect lights have been fixed or if there is a guide that could be used to make them turn on / add additional functionalities.

Hi Protowave, I merged your post into the existing thread for this controller. Please see my post above for a script that works with Mixxx 2.2.3. Do not copy any other scripts into your user folder or rename the XML file and do not change anything in the “Scripts” tab in the preferences (this tab will be removed in Mixxx 2.3 because it is useless and confuses people). Delete your whole ~/.mixxx/controllers folder and copy the files from my post above into ~/.mixxx/controllers and use Mixxx 2.2.3.

If you would like to finish and document this mapping and contribute it to Mixxx, that would be great! A good friend of mine has this controller so I’m sure she would appreciate that too. Please note the common-hid-packet-parser.js library is very messy code that creates as many problems as it solves. We’ll be working on improving the mapping system for Mixxx 2.4 in many ways. We have a contributor working on an HID mapping for the Pioneer CDJ 2000 NXS2 who will also be working on a new HID packet parsing library.

By the way, the 2.2 branch does not build with CMake. That is new in master, which will be branched off to 2.3 beta imminently.

Hi and thank you for your help!
I linked your post in my previous post in step 2.
I have tried it with those two files only now. But it didn’t work. Here’s what I did:

I removed the entire ~/.mixxx/controllers folder and started mixxx 2.2.3 (that’s the 2nd version in the post above). This generated a new controllers folder. I quit mixxx. Then I copied those two files into the folder without renaming them or also copying in any other file. Then I restarted mixxx. Under Load Presets the option for the S2 MK2 was missing and it didn’t recognize any button-presses. I quit and restarted mixxx. After doing so there was an option for Traktor_S2_MK2_ID_ID (the option is named differently than previously because the xml file has other contents) under Load Preset. It also generated a new file “Traktor_Kontrol_S2_MK2_ID_ID.hid.xml” in the ~/.mixxx/controllers folder. Maybe I only forgot that this file was autogenerated and might have found out with further testing. This means that the step to rename the xml file might not be necessary. However after selecting the Preset and applying it still doesn’t work. And the Scripts tab looks like in the screenshot below. This is because the newly generated Traktor_Kontrol_S2_MK2_ID_ID.hid.xml file doesn’t have script files. And hence you probably do need to rename the file to make it work. Maybe it works after simply redoing the above again so it generates the file properly. The file only had this:

And the Script tab looks like:

But maybe there are some other problems with my setup so others might not have this problem. I hope the posts help if it doesn’t work for whatever reason.

It works after deleting the newly generated file and renaming the .xml file exactly like the generated file was named. There still is the problem with the always-enabled FX1 effect rack.

I really would like to edit the mapping but I don’t know if and when I will. This is also why I’m interested in a guide that lists the button IDs and explains the places in the mapping to make changes to. I think the S2 MK2 is an important controller as it’s a very neat beginner controller that probably many have. A new mapping system and HID packet parsing library sounds great! Thank you.

The effects always enabled problem might have been because of redundant handling of the effects enabled buttons. Try the files attached to this post.

Protowave, delete your whole ~/.mixxx/controllers folder first. I think the confusion with the XML file before was because I only used the “.xml” file extension instead of “.hid.xml” as required for Mixxx to recognize it. In Mixxx 2.3 we’re getting rid of this confusing copying of mapping files unless the user has edited the mapping via the GUI, but that’s only possible for MIDI mappings, not HID. Documentation for HID mappings and the common-hid-packet-parser.js library are on the wiki.
Traktor Kontrol S2 Mk2.hid.xml (643 Bytes)
Traktor-Kontrol-S2-MK2-hid-scripts.js (45.9 KB)

Thank you! With these files the four FX-rack dis/enabling button lights work. However the effects still get applied when having FX1 disabled. Furthermore there are two new problems: the IN and OUT loop buttons of the right deck are permanently on (they flicker) and the effect buttons need to be held instead of only pressed. I also had the former problem with some other mapping or version. I think it was the MK3 or MK4 mapping with the same version.
I’ll look into this further and do more testing later. And thanks for the links.

Undoing all the changes to Traktor-Kontrol-S2-MK2-hid-scripts.js except for the removal of one line allows the effect buttons to be used with pressing them once instead of holding them. The IN and OUT button on the right side are often only both on if the deck is playing - if it’s not playing and the sound has faded the OUT button isn’t flickering anymore. They were still on after the sound has faded the last time I checked though. Furthermore the left CUE button is permanently on on the left side since this line was removed.
However, removing that line makes the FX-en/disabled buttons work. The line removed is:

TraktorS2MK2.linkChannelOutput("[EffectRack1_EffectUnit1_Effect1]", "enabled", TraktorS2MK2.outputChannelCallback);

I couldn’t find a way to prevent effects getting applied even though FX1 is disabled so far. I tried different versions and replacing the files common-controller-scripts.js, common-hid-devices.js, common-hid-packet-parser.js in mixxx/res/controllers/ with the ones of the version that’s working on another computer. So far it seems like it’s a problem within the mixxx software or potentially with some configurations of either of my two computers.

Furthermore I don’t know why I’m getting these errors in the console when starting mixxx (2.2.3):

because I already gave writing permissions in the /etc/udev/rules.d/mixxx.usb.rules. I tried setting it to 0777 instead of 0660, checked if my username was written correctly and also tried adding:

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{bInterfaceClass}=="03", GROUP="username", MODE="0660"

I did run sudo udevadm control --reload-rules && sudo udevadm trigger after making the changes. But I still get these error messages. I don’t think it’s the cause of this problem though.

When starting mixxx with the mapping for MK3 all effect buttons except the 2nd from the right are permanently on.

I might look into it further later and might edit this post.