| Crates.io | launchkey-sdk |
| lib.rs | launchkey-sdk |
| version | 0.1.5 |
| created_at | 2025-05-01 16:20:52.504654+00 |
| updated_at | 2025-05-03 09:14:52.952498+00 |
| description | A type-safe Rust SDK for Novation Launchkey MIDI controllers. Enables full control over pads, encoders, faders, displays, and DAW integration with support for RGB colors, bitmaps, and cross-platform development. |
| homepage | |
| repository | https://github.com/bornacvitanic/launchkey-sdk |
| max_upload_size | |
| id | 1656445 |
| size | 71,169 |

launchkey-sdk is a type-safe Rust SDK for Novation Launchkey MIDI controllers.
Novation provides a detailed programmer's guide for their MIDI protocol, but no official library exists — this SDK fills that gap with a complete, ergonomic, and extensible solution in Rust.
It provides complete programmatic control over pads, encoders, faders, screen(s), and more. Whether you're building custom DAW integrations, stage tools, or creative MIDI workflows, this SDK gives you low-level access with high-level ergonomics.
The SDK is designed to support both Standalone and DAW mode operations, includes RGB color and bitmap display support, and is built for portability across platforms.
This project is an unofficial, independently developed SDK for Novation Launchkey MIDI controllers.
It is not affiliated with, endorsed by, or supported by Novation or Focusrite.
The SDK is based on the official Launchkey MK4 Programmer’s Reference Guide (PDF) provided by Novation.
It maps all known SysEx, CC, and control behavior as documented in that guide.
CommonColor variants| Model | Regular | Mini |
|---|---|---|
| Launchkey MK4 | ✅ | ✅ |
| Launchkey MK3 | ❌ | ❌ |
| Launchkey MK2 | ❌ | ❌ |
Auto detect Launchkey SKU
Launchkey MK4 Feature Control Support
Implement support for Launchkey MK4's full MIDI CC-based feature control system over DAW In port:
FeatureControl API for reading/writing values by logical name Auto Hotplug Detection
Automatically reconnect or react to device plug/unplug events on supported platforms.
Launchkey MK3 Support
Add support for older MK3 devices with their unique SysEx and CC mappings.
Launchkey MK2 Support
Add support for older MK2 devices with their unique SysEx and CC mappings.
Bitmap Composition Utilities
Add text/image/sprite rendering support into LaunchkeyBitmap, including:
Custom Pad Layout Mapping
User-defined pad banks and aliases for dynamic page switching and alternate grid mappings.
Preset Management API
Load/save pad layouts, colors, fader modes, and display state as named user presets.
Remember Active Pad/Encoder/Fader Mode State
Implement functionality to remember the state of the active pad, encoder, and fader mode, even across session resets.
Support for Multiple/Virtual Modes
Enable support for multiple or virtual modes, including:
CLI Tool (launchkey-cli)
A separate command-line interface for sending test commands, bitmaps, display updates, etc.
MIDI Monitor
Log all incoming MIDI messages, highlighting Launchkey-specific controls like encoders, faders, and pads.
Visual Metronome
Flash a pad or row of pads in time with a given BPM.
Interactive Finger Drumming Pad Trainer
Create an interactive pad trainer to help users practice finger drumming, with real-time feedback and customizable exercises.
Custom Drum Pad Layout
Re-map pads to custom MIDI note triggers or DAW controls, with LED and screen feedback for each pad.
Performance Mode
Animate pads with pulse/flashing color patterns and update display labels dynamically during performance.
Live Parameter Visualizer
Show encoder or fader values visually on the screen — as bars, dials, or numbers — while they are being used.
This library works on Windows, macOS, and Linux without any external dependencies.
Add this to your Cargo.toml:
[dependencies]
launchkey-sdk = "0.1.0"
fn main() {
let mut manager = LaunchkeyManager::default().unwrap();
let mut manager = manager.into_daw_mode().unwrap();
}
fn main() {
//...
manager.send_command(LaunchkeyCommand::SetPadColor {
pad_in_mode: PadInMode::DAW(Pad::Mixer),
mode: LEDMode::Stationary,
color_palette_index: CommonColor::BrightGreen.into(),
}).unwrap();
}
fn main() {
//...
manager.send_command(LaunchkeyCommand::SetEncoderMode {
mode: EncoderMode::Normal,
}).unwrap();
}
fn main() {
//...
manager.send_command(LaunchkeyCommand::SetScreenTextGlobal {
target: GlobalDisplayTarget::Stationary,
arrangement: Arrangement::NameValue("DAW Mode".to_string(), "Ready".to_string()),
}).unwrap();
}
fn main() {
let (tx, rx) = mpsc::channel();
let midi_in = MidiInput::new("MIDI Listener").unwrap();
let ports = get_named_midi_ports(&midi_in);
// Connect to all available MIDI ports
let _connections = connect_all_midi_ports(&ports, tx.clone());
loop {
if let Ok(data) = rx.recv() {
if let Ok(event) = MidiMessage::try_from(data.as_slice()) {
match event {
// Recognize Pad Press
MidiMessage::NoteOn(_, note, _) => {
if let Some((pad, mode)) = Pad::from_value(note as u8) {
println!("Pad {:?} pressed in mode {:?}", pad, mode);
}
}
// Recognize Pad Mode Change
MidiMessage::ControlChange(_, control_function, value)
if control_function.equals_u8(PAD_MODE_CC) =>
{
println!("Pad Mode Changed: {:?}", PadMode::from_value(value.into()));
}
_ => {}
}
}
}
}
}
LaunchkeyManager: Handles MIDI communication and device stateCommands: Type-safe API for all device operations (pads, displays, modes)Colors: Both predefined palette indices and custom RGB valuesMIDI Handling: Built-in utilities for control change, note on/off, SysEx messagesThis repository includes additional tools built on top of the SDK, located in the /apps directory:
| Name | Description |
|---|---|
midi-debugger |
A real-time MIDI event logger to inspect and debug Launchkey messages. |
melodics-companion |
A helper tool to augment Melodics training sessions with additional controls and visual feedback. |
Each tool can be run independently and includes its own README for usage and setup instructions.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
From implementations.