[−][src]Constant midi_consts::channel_event::MIDI_CHANNEL_MASK
pub const MIDI_CHANNEL_MASK: u8 = 0b0000_1111;
The first byte of a channel event contains both the event type and the midi channel in one byte. Use this bit mask to get the midi channel.
Example
use midi_consts::channel_event::MIDI_CHANNEL_MASK; let byte: u8 = get_byte(); // Suppose we got this byte somewhere. let midi_channel: u8 = byte & MIDI_CHANNEL_MASK; // (binary AND)