midi-simple-0.1.0.0: A simple and fast library for working with MIDI messages

Sound.MIDI

Synopsis

# Encoding

Encode some collection of MidiMessages to a lazy ByteString

Strict version of encodeMidi

Encode a single message to a lazy ByteString

Strict version of encodeMidi1

# Decoding

Decode raw MIDI data from a strict ByteString. Any incomplete data at the beginning will be skipped! This function assumes a normalized MIDI stream, i.e. one in which events are not interrupted by real-time events!

Decode one event from raw MIDI data in a strict ByteString. Any incomplete data at the beginning will be skipped!

Partition an event stream into real-time events and other messages. The first parameter returned will be the real-time events, the second element will be the rest of the stream. Note that this effectively normalizes the second element.

# Parser and Serializer

Top level parsing and serializing tools are exposed here. For fine-grained access, see Sound.MIDI.Parser and Sound.MIDI.Serialize.