•
3 min read
libkp

I have a Kemper Profiler Player. It sounds great. The software Kemper ships around it frustrates me at just about every level, but one thing in particular: the Rig Manager app on my phone can control the Profiler over the network, and the desktop app, which does nearly all the same things, can’t.

So I went and figured out how the phone does it.

The libkp Meters app on macOS, showing the loaded rig, its effect blocks, and output levels

The Android version of Rig Manager turns out to be a Qt app with all of its logic in one native library, and the symbol table was still intact. That gave me a map of every class and method, which made the traffic a lot easier to read. From there I built a small proxy that pretends to be a Profiler on the network, so the real app would connect to it and I could watch both sides of the conversation.

The protocol has a few layers. The Profiler announces itself over UDP broadcast. A TCP handshake offers a list of protocol GUIDs to choose from. One of them opens a MIDI stream wrapped in its own 4-byte framing, which carries parameter reads and writes plus a block of meter values about 20 times a second. Another opens a CBOR channel, which is the only one Rig Manager actually uses, and the only place the morph position shows up. Neither channel tells you everything, so the library opens both.

Some lessons were learned the hard way. Load two rigs in quick succession and the device wedges until you power-cycle it, so libkp queues rig changes and never sends one directly.

libkp is a written protocol spec plus implementations in Python, Rust, and Swift, which share constant tables generated from that spec and are tested against the same captures of real traffic. The Python version is on PyPI. Each language comes with a live meters view, and the macOS one grew into a prototype remote control. Here is the terminal version, pointed at the fake Profiler that ships with the library for testing:

The terminal meters view showing a rig, signal chain, effect blocks, tuner, and level meters, running against libkp’s built-in fake device

The part I use every day is a Home Assistant integration built on top of it. It shows which rig is loaded and whether anyone is playing, and it writes to Home Assistant twice per playing session instead of twenty times a second. In my office, the power amps sit on smart plugs that follow that sensor. Pick up the guitar and they turn on. Stop for a few minutes and they turn off.

It only covers what I needed and has only been tested on my one Player, but now my house knows when I’m playing guitar.