Skip to main content

parse_sfz

Function parse_sfz 

Source
pub fn parse_sfz(text: &str) -> Result<SfzInstrument<'_>, AudioError>
Expand description

Parse an SFZ text instrument into a bounded SfzInstrument.

An empty file (or a file with no <region>) yields an empty instrument (is_empty()), NOT an error — an instrument with zero playable regions is a valid, well-formed result. Errors are returned only for genuinely malformed structure: a key/velocity value that is not a parseable MIDI number or note name, or exceeding MAX_REGIONS.