| Crates.io | mii |
| lib.rs | mii |
| version | 0.2.0 |
| created_at | 2022-06-05 21:31:57.619883+00 |
| updated_at | 2025-08-21 22:18:04.516474+00 |
| description | A rust-embedded implementation of the monome ii protocol |
| homepage | |
| repository | https://github.com/ATOVproject/mii |
| max_upload_size | |
| id | 600349 |
| size | 41,055 |
miiA
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.
no_std compatible - Perfect for embedded environmentsAdd this to your Cargo.toml:
[dependencies]
mii = "1"
use mii::{Command, er301};
// Create a buffer sized for the longest possible command
let mut buffer = [0u8; er301::Commands::MAX_LENGTH];
// Create a command
let command = er301::Commands::SetCv { port: 5, value: 8192 };
// Serialize to bytes
let message: &[u8] = command.to_bytes(&mut buffer).unwrap();
// Send over I2C to the device
// send_i2c(er301::ADDRESS, message);
| 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 |
use mii::{Command, ansible};
let mut buffer = [0u8; ansible::Commands::MAX_LENGTH];
// Set CV output
let cv_cmd = ansible::Commands::SetCv { port: 0, value: 4096 };
let message = cv_cmd.to_bytes(&mut buffer).unwrap();
// Trigger pulse
let pulse_cmd = ansible::Commands::SetTrPulse { port: 1 };
let message = pulse_cmd.to_bytes(&mut buffer).unwrap();
use mii::{Command, just_friends};
let mut buffer = [0u8; just_friends::Commands::MAX_LENGTH];
// Play a note
let note_cmd = just_friends::Commands::PlayNote {
output: 1,
pitch: 1000,
volume: 8000
};
let message = note_cmd.to_bytes(&mut buffer).unwrap();
use mii::{Command, telexo};
let mut buffer = [0u8; telexo::Commands::MAX_LENGTH];
// Set oscillator pitch
let osc_cmd = telexo::Commands::SetOscPitch { port: 0, pitch: 2048 };
let message = osc_cmd.to_bytes(&mut buffer).unwrap();
// Note: Telexo uses BASE_ADDRESS + device index (0-7)
// Final address = telexo::BASE_ADDRESS + device_index
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.
Licensed under either of
at your option.
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.
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.