Get midi input from a Kontrol S4?

I have plugged in a Kontrol S4 to my computer, with the appropriate drivers and what not (it works in Traktor). But when I try to view the MIDI Input data coming from the controller, I can’t seem to get any data! I’ve tried using Bome’s MIDI Monitor as well as MIDI-OX to no avail.

Does anyone have an S4 or know what the secret is to getting this thing to produce output? I checked the Internet and the S4 specs do say that it can be used with other software packages besides Traktor, so it’s not a proprietary thing (I hope).

That’s the two little virtual turntables, right? I think you have to actually put it in ‘MIDI mode’. It’s something like + on the controller.

Yes that’s right, funny because I just found a reference for that, less than 10 minutes ago.

But now I see that the Kontrol S4 talks to Traktor using NHL over HID…which is proprietary. A bunch of things don’t work when using the MIDI mode.

FWIW, I’ve got good HID and USB sniffers put together if you want to reverse engineer the protocol. Most aren’t very complicated.

I would love to see that!!!

I’ll blow the dust off and find somewhere to push one. Windows is your preferred platform?

Sure! If you want to put it up on Github I might work on it. Did you write the HID apis yourself or use that library I linked ( This lib looks really good and its as cross-platform as JUCE.

I wrote the HID stuff myself ages ago. I haven’t had a look at the library your posted yet. I had figured you’d want to sniff. That is, watch the traffic between the controller and their app. If you just want to open HID devices, that is much easier. But, of course, you can only see what the controller sends.

I would definitely like to sniff first! Stop teasing me! There’s a joke in here about the “finger test” somewhere, if you look hard enough.

Not generally a tease, though I’m not always as quick at following up as I’d like. It’s more a problem of being old. Really. I started writing USB kernel stuff with Windows 95 OEM 2.1 (the first Windows that supported USB), so, like MIDI, which I worked with back in the early 80s when it was new (and thought that the whole standard was stupid and would never last and told Chris Meyers at Sequential so!) a lot of my bits and pieces are ancient.

So I do need to pull them out, make sure they compile and run, etc. Sniffing can be trickier, since it generally involves loading a filter driver. That’s changed in two dimensions over the last 10 years with Windows, you now have to have both 32 and 64 bit builds, and Win Vista and Win 7 are a lot more rigid about drivers being at least signed.

So I’ll pull together a sniffer for you, just give me a few days. I’ve got to finish my taxes (this post is a form of avoidance), and I was hoping to get Audio Host and VST building untangled in Linux (from another thread here).

Don’t go out of your way then, but do have a look at the hid lib and see if it has all of the right bits to put together a quick sniffer. It might be less work than bringing an old project up to date.

I suspect it opens the devices using the Windows API. Which let’s you seem them and talk to them (see the Microsoft hClient sample). But they might have found a way to sniff I’m not up on.

For example, you used to absolutely require a kernel driver to talk to USB devices, but starting with Vista Microsoft included a generic USB driver you could access from User space (much like IOKit on the Mac and using FSxxx on Linux).

I figured that since there was already another request about HID it was worth bringing some pieces up to date regardless.

I have some serious hotel down time and was going to get back to this. Have you spent any more time on it? I’m curious if the existing library worked out for you.

I have not done anything on the HID side, but I did put the S4 into Midi mode and fool around with it.


I’m able to put the S4 into midi mode and communicate with it. Of course, some features are disabled. Notably, the loop LED indicators cannot be controlled with midi messages.

I downloaded this hidapi library (, compiled and ran it. The thing found my gaming mouse and natural keyboard, but it doesn’t seem to see the S4 (although Traktor sees it). hidapi gives a cryptic “unable to open device” in the list of found devices.

It also seems that hidapi requires a .DLL, hidapi.dll. I’m not sure if this is just how it was built, or if it is this way because it needs to install some sort of hooks. I hope its just like this because the developers like shared libraries (If I used it I would just include the sources directly in my app, probably as part of VFLib).

I just got back in town (after a detour to my daughter’s college graduation). Truth be told, I’m still recovering from the worst hangover of my adult life (never a good idea for an aged person like myself to claim the title of ‘king of tequila’ when surrounded by college students). But after a day or so of catchup (and rehydration), I’ll take a look at this again.

I was able to see data from the S4 using this utility: “USBTrace”

Unfortunately its a limited demo version.

FWIW, Windows 7 has event tracking built into the Microsoft provided USB drivers:

There is a better article on it somewhere, but I can’t find it right now. It’s pretty close to sniffing and doesn’t require installing anything. Most sniffers install a kernel level filter driver. That’s not a huge deal, but you generally have to sign the driver and build for 32 or 64 bit depending on the install. Again, I’ll be caught up in a day or so. In the mean I’ll shoot some emails around and see if I can even borrow the same device.