7 releases

0.0.6 Sep 15, 2024
0.0.5 Oct 5, 2023
0.0.4 Jun 12, 2023
0.0.3 Dec 13, 2022
0.0.1 Jan 30, 2021

#473 in Encoding

Download history 72/week @ 2024-07-27 194/week @ 2024-09-14 18/week @ 2024-09-21 12/week @ 2024-09-28 1/week @ 2024-10-05 44/week @ 2024-10-12 12/week @ 2024-10-19 6/week @ 2024-10-26 5/week @ 2024-11-02

67 downloads per month

MIT/Apache

155KB
3K SLoC

Rust MIDI File Library

The purpose of this library is primarily to be able to author and write MIDI files in Rust. The library also parses MIDI files and thus can "round trip" files.

Unimplemented Features

  • sysex messages
  • sequence number messages
  • sequencer specific messages

Interface

All the bytes, messages and such are represented with pub structs and enums, but the structs have private members. To create a basic file, as I have done in an example, I have added functions at the Track level. With these functions you can build up a file without as much knowledge of the underlying data structure.

You need to understand MIDI in order to create a meaningful MIDI file, but any file you create with the library should be technically valid per the spec. You do not need to understand the meaning of any particular byte's numeric value.


lib.rs:

A library for reading, writing and creating MIDI files.

!

Dependencies

~0.4–0.9MB
~19K SLoC