Harness non-MIDI controls of Komplete Kontrol keyboards on Linux effortlessly.
Project details
kontrol-rs is a Rust implementation that facilitates the use of non-MIDI controls on the Komplete Kontrol A-series keyboards (A25/A49/A61) under Linux. It supports the same command line options and file formats as the original C tools, ensuring seamless integration for users familiar with the existing ecosystem.
kontrol-rs is a Rust implementation of the utilities designed for controlling the non-MIDI features of the Komplete Kontrol A-series keyboards (A25/A49/A61) on Linux. This project revives the functionality of the original komplementary-kontrol, making it compatible and providing a seamless experience for users on the Linux platform.
The kontrol-rs library contains both primary tools—komplement and konfigure—which retain the original's command line options, file formats for mappings (.map) and presets (.pst), HID protocol handling, LED behavior, and exit codes.
| Binary | Function |
|---|---|
komplement | A resident daemon that reads HID reports from the keyboard, translates button presses into keystrokes via /dev/uinput, sends MMC over an ALSA sequencer port, and manages LED illumination through HID. |
konfigure | An offline generator for the SysEx that configures the keyboard's knobs and buttons. |
The Rust implementation follows the structure of the original C code, allowing users to easily compare both versions:
| Rust | C |
|---|---|
src/buttons.rs | button_names.c |
src/keys.rs | uinput_stuff.c |
src/mmc.rs | mmc_stuff.c |
src/mapping.rs | mapping.c |
src/config.rs | config.c |
src/hid.rs | hid.c |
src/hid_dump.rs | hid_dump.c |
src/leds.rs | button_leds.c |
src/uinput.rs | uinput_stuff.c |
src/alsa_seq.rs | alsa.c |
src/preset.rs | konfigure_parser.c + the SysEx layout of konfigure.c |
src/engine.rs | komplement.c |
src/bin/komplement.rs | komplement.c |
src/bin/konfigure.rs | konfigure.c |
This port introduces additional modules not found in the C tool, dedicated to the keyboard's display functionalities, incorporating elements such as frames, reports, decoding, and state management from a DAW's Mackie Control Universal output.
The project includes multiple options to operate the tools effectively. Below are some examples for clarity:
# Start Komplement for the Komplete Kontrol A49 Keyboard (USB ID: 17cc:1740) using a Reaper mapping:
disown -h
komplement -m mappings/reaper.map -p 1740 -o /dev/uinput
# After making changes to the mapping file, restart the tool:
konfigure -q -p presets/basic_cc.pst > my_template.syx
The komplement command offers various options such as specifying the mapping file, product/vendor IDs, and output paths, among others.
komplement can probe the keyboard’s display and handle custom settings through a comprehensive configuration file. This file enables users to dictate behavior for knobs and buttons, ensuring a tailored experience based on individual needs.
The Rust implementation comes with enhancements and user-friendly features:
evdev crate, providing consistent /dev/uinput behavior without alternative path options.Overall, kontrol-rs offers an essential toolset for Linux users aiming to leverage their Komplete Kontrol A-series keyboards without needing MIDI, efficiently integrating advanced functionalities into their workflow.
Comments
0Start the conversation
Share the first comment.