next_message

Function next_message 

Source
pub fn next_message(m: &[u8]) -> Option<usize>
Expand description

Find the index of the next message in a MIDI byte sequence. This is useful for being able to skip over messages, which may be necessary when a message is unable to be deserialized.

This will skip any running status messages, since we’re not parsing the byte stream, we’re just looking for a “status byte” – a byte with the upper bit set.