loopers-common 0.2.0

Common code for loopers project. See loopers-jack for for the main project.
Documentation
#[derive(Debug)]
pub enum MidiEvent {
    ControllerChange {
        channel: u8,
        controller: u8,
        data: u8,
    },
}

impl MidiEvent {
    pub fn from_bytes(bs: &[u8]) -> Option<Self> {
        if bs.len() == 3 && bs[0] >> 4 == 0xb {
            Some(MidiEvent::ControllerChange {
                channel: bs[0] & 0b1111,
                controller: bs[1],
                data: bs[2],
            })
        } else {
            None
        }
    }
}