Skip to main content

parse

Function parse 

Source
pub fn parse(bytes: &[u8]) -> Result<Smf<'_>>
Expand description

Parse a Standard MIDI File (or one in a RIFF RMID wrapper).

Strict where being lenient would show a table that looks whole and is not: a track that runs past the end of the file, an event cut short, a data byte with no status before it, or fewer tracks than the header says are errors. Chunks other than MTrk are skipped, as the specification says, and anything after the last track the header promises is ignored. A track may end without its End of Track event.