| Crates.io | bmdse |
| lib.rs | bmdse |
| version | 0.1.0 |
| created_at | 2025-12-25 15:04:14.517645+00 |
| updated_at | 2025-12-25 15:04:14.517645+00 |
| description | An interface for talking with a Black Magic Design Speed Editor using the HID API in written in Rust. |
| homepage | |
| repository | https://github.com/BaukeWestendorp/bmdse |
| max_upload_size | |
| id | 2004638 |
| size | 166,956 |
An interface for talking with a Black Magic Design Speed Editor using the HID API in written in Rust.

This library was created because I was missing MIDI functionality for the Speed Editor, when experimenting with controllers for my other project zeevonk. I ended up writing this high-level API, with an internal low(er)-level driver, as I did not want to constantly manage another thread for the event polling in each of my small testing-purpouse applications.
This library has a single dependency: hidapi!
Thanks to Sylvain "tnt" Munaut for reverse engineering the difficult parts like authentication!
use std::{
sync::{Arc, RwLock},
thread,
time::Duration,
};
use bmdse::{Button, SpeedEditor};
fn main() {
// Because we go over a thread boundary inside the event handler callbacks,
// we have to wrap the state in Arc<RwLock<T>>.
let state = Arc::new(RwLock::new(State::default()));
let _speed_editor = SpeedEditor::new()
.unwrap()
.on_wheel_change({
let state = Arc::clone(&state);
move |velocity| {
let mut state_guard = state.write().unwrap();
state_guard.absolute_wheel_value += velocity as i64;
}
})
.on_button_change({
let state = Arc::clone(&state);
move |button, pressed| {
if !pressed {
return;
};
let mode = match button {
Button::Timeline => Mode::Timeline,
Button::Source => Mode::Source,
_ => return,
};
let mut state_guard = state.write().unwrap();
state_guard.mode = mode;
}
});
loop {
eprintln!("{:?}", state.read().unwrap());
thread::sleep(Duration::from_millis(20));
}
}
#[derive(Debug, Default)]
struct State {
mode: Mode,
absolute_wheel_value: i64,
}
#[derive(Debug, Default)]
enum Mode {
#[default]
Source,
Timeline,
}
You can run the examples using
cargo run --release --example simple or cargo run --release --example state
Sometimes the Speed Editor HID device is opened, does not receive events when connected using bluetooth. If anyone knows what is going on here, feel free to create an issue, or even better a PR!
Feel free to start an issue to discuss about missing features or found bugs, it's OSS after all!