Closed Robert-K closed 2 years ago
Up to my knowledge it is not possible to access the light guide with the standard protocol. I guess you did reengineer the USB protocol?
I wasn't aware you were using something else. With python and hidapi, it's pretty straightforward:
import hid
PID = 0x17CC # Native Instruments
VID = 0x1630 # Komplete Kontrol S88 MK2
NUM_KEYS = 88
INIT = 0xA0
SET_BTNS = 0x80
SET_KEYS = 0x81
device = hid.device()
device.open(PID, VID)
device.write([INIT])
def color(hue, brightness=2):
return hue * 4 + brightness
device.write([SET_KEYS] + [color(2)] * NUM_KEYS)
If you do this you take over the full device, which means you cannot use the Komplete Kontrol plugin support anymore. Furthermore, you cannot open the ports so easily on all OSs since the NI drivers block it.
I'd like to start this issue off with a huge thank you, this repository alone makes the expensive brick I bought actually useable ❤
I've dabbled in reverse engineering the KK Mk2 before and was able to capture the and show the display data sent to the keyboard using Python. I also managed to create some light shows using the light guide.
IIRC controlling the light guide works pretty much the same way as controlling the button LEDs (Buttons have prefix 0x80, keys 0x81).
Have you considered making use of the light guide? I imagine it could significantly enhance the workflow, for example:
Some more experimental / advanced features could be:
It would have to be optional so as not to conflict with the Komplete Kontrol software.
If that's something you'd consider possible and reasonable, I'd love to contribute!