mii
A
no_stdRust library for serializing monome ii protocol commands
A hardware-agnostic library that provides type-safe structures for ii-protocol commands used with various Eurorack modules. This crate focuses solely on command serialization into correct byte sequences - it does not handle I2C communication itself.
Features
no_stdcompatible - Perfect for embedded environments- Type-safe command structures - Compile-time guarantees for valid commands
- Hardware agnostic - Bring your own I2C implementation
- Multiple device support - Covers popular Eurorack modules
- Zero-copy serialization - Efficient buffer-based approach
Quick Start
Add this to your Cargo.toml:
[]
= "1"
Basic Usage
use ;
// Create a buffer sized for the longest possible command
let mut buffer = ;
// Create a command
let command = SetCv ;
// Serialize to bytes
let message: & = command.to_bytes.unwrap;
// Send over I2C to the device
// send_i2c(er301::ADDRESS, message);
Supported Devices
| Device | Module | I2C Address | Commands |
|---|---|---|---|
| Ansible | Monome Ansible | 0x20 |
CV, trigger, slew, presets, Kria step control |
| ER-301 | Orthogonal Devices ER-301 | 0x31 |
Gate, CV, CV slew |
| Just Friends | Mannequins Just Friends | 0x70 |
Gate, note playback |
| Telexo (TXo) | BPC Telexo | 0x60 + device index |
Gate, CV, oscillator, envelope |
Device Examples
Ansible
use ;
let mut buffer = ;
// Set CV output
let cv_cmd = SetCv ;
let message = cv_cmd.to_bytes.unwrap;
// Trigger pulse
let pulse_cmd = SetTrPulse ;
let message = pulse_cmd.to_bytes.unwrap;
Just Friends
use ;
let mut buffer = ;
// Play a note
let note_cmd = PlayNote ;
let message = note_cmd.to_bytes.unwrap;
Telexo
use ;
let mut buffer = ;
// Set oscillator pitch
let osc_cmd = SetOscPitch ;
let message = osc_cmd.to_bytes.unwrap;
// Note: Telexo uses BASE_ADDRESS + device index (0-7)
// Final address = telexo::BASE_ADDRESS + device_index
API Reference
Minimum Supported Rust Version (MSRV)
This crate is guaranteed to compile on stable Rust 1.85 and up. It might compile with older versions but that may change in any new patch release.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Code of Conduct
Contribution to this crate is organized under the terms of the Rust Code of Conduct, the maintainer of this crate promises to intervene to uphold that code of conduct.