Skip to main content

encode

Function encode 

Source
pub fn encode(msgs: &[Vec<u8>], ts_ms: u16, max: usize) -> Vec<Vec<u8>>
Expand description

Frame whole MIDI messages into BLE-MIDI packets of at most max bytes (max ≥ 5), packing several messages per packet. ts_ms is the 13-bit millisecond timestamp (wraps).