read_smf_lenient keeps what comes before MAX_EVENTS events or MAX_TRACKS
tracks and only says so in a warning. Those warnings are words, and at
most MAX_WARNINGS of them are kept: when earlier damage has filled them,
nothing tells the caller that the file was cut.
LenientRead gets over_limit, set whenever either limit left something
out, full warnings or not. A caller that refuses over-limit files, as
read_smf does, can now do so after a lenient read. LenientRead is
non_exhaustive, so the new field breaks no caller.
* craft-midi: lenient reader, instrument names, end tick, format-0 writing
read_smf_lenient reads what makes sense of a damaged file and returns
warnings, with the tolerance rules of LoopCraft's SMF reader. SmfTrack
gains the Instrument Name meta event, Smf the last tick any track reaches,
and write_smf writes format 0 when Smf::format is 0. Smf::default() is
now explicitly format 1, so a default-built file is still written as
format 1.
* craft-midi: keep Smf and SmfTrack unchanged; lenient extras in LenientRead
SoundCraft builds Smf and SmfTrack with struct literals, so new fields
would break it. Instrument names and the end tick now come back in the
non-exhaustive LenientRead that read_smf_lenient returns; the writer no
longer writes instrument names (no caller needs it).
read_smf (formats 0 and 1, format 2 best effort) and write_smf (format 1,
960 PPQ) with the model they read into: Note, CtrlEvent, CtrlKind and
Sequence, in ticks at 960 per quarter note. serde on the model types is
behind the `serde` feature.
Moved from soundcraft crates/midi at 17d3f007: smf.rs, sequence.rs, the
error type, the SMF tests and the Sequence tests. The editing operations
(quantize, transpose, ...) and the display names stay in SoundCraft. Adds
a test for the MAX_TRACKS limit, which had none.