Skip to main content

extract_smf_provenance

Function extract_smf_provenance 

Source
pub fn extract_smf_provenance(
    smf: &SmfFile,
    out: &mut [ProvenancePair],
) -> Result<usize, AudioError>
Expand description

Extract provenance pairs from every track of smf into out, in track then event order.

One ProvenancePair is emitted per recognised meta-event: MetaEvent::TrackName, MetaEvent::Tempo, MetaEvent::TimeSignature, MetaEvent::KeySignature, MetaEvent::SequenceNumber, and the copyright notice (MetaEvent::Unknown with type META_COPYRIGHT). All other events (channel messages, SysEx, end-of-track, other Unknown metas) are skipped.

Returns the number of pairs written.

ยงErrors