Module midly::live

source ·
Expand description

Provides utilities to read and write “live” MIDI messages produced in real-time, in contrast with “dead” MIDI messages as stored in a .mid file.

LiveEvent is very similar to TrackEventKind, except for subtle differences such as system realtime messages, which can only exist in live events, or escape sequences, which can only exist within track events.

Usually OS APIs (and notably midir) produce MIDI messages as a slice of raw MIDI bytes, which can be parsed through LiveEvent::parse and written through LiveEvent::write.

Note that MIDI byte streams, which are not clearly delimited packets, must be parsed through the stream api.

Enums

A live event produced by an OS API or generated on-the-fly, in contrast with “dead” TrackEvents stored in a .mid file.
The different kinds of info a Midi Time Code Quarter Frame message can carry.
A “system common event”, as defined by the MIDI spec.
System Realtime messages are one-byte messages that only occur within live MIDI streams. They are usually time-sensitive, get top priority and can even be transmitted in between other messages.