Add class definitions for various message types.
Document how to serialise a MidiEvent to a string.
This specification defines a data type for a MIDI message, midi:MidiEvent, which is normalised for fast and convenient real-time processing. MIDI is the Musical Instrument Digital Interface, a ubiquitous binary standard for controlling digital music devices. For plugins that process MIDI (or other situations where MIDI is sent via a generic transport) the main type defined here, midi:MidiEvent, can be mapped to an integer and used as the type of an LV2 Atom or Event. This specification also defines a complete human and machine readable description of the MIDI standard (except for standard controller numbers). These descriptions are detailed enough to express any MIDI message as properties.
A series of contiguous bytes (usually one) in a message.
A single raw MIDI message (i.e. a sequence of bytes). This is equivalent to a standard MIDI messages, except with the following restrictions to simplify handling: Running status is not allowed, every message must have its own status byte. Note On messages with velocity 0 are not allowed. These messages are equivalent to Note Off in standard MIDI streams, but here only proper Note Off messages are allowed. "Realtime messages" (status bytes 0xF8 to 0xFF) are allowed, but may not occur inside other messages like they can in standard MIDI streams. All messages are complete valid MIDI messages. This means, for example, that only the first byte in each event (the status byte) may have the eighth bit set, that Note On and Note Off events are always 3 bytes long, etc. Where messages are communicated, the writer is responsible for writing valid messages, and the reader may assume that all events are valid. If a midi:MidiEvent is serialised to a string, the format should be xsd:hexBinary, e.g. (in Turtle notation): [] eg:someEvent "901A01"^^midi:MidiEvent .
The value of a pitch bender (-8192 to 8192).
The 0-based index of a byte which is part of this chunk.
The numberic ID of a controller (0 to 127).
Song position in MIDI beats (16th notes) (-8192 to 8192).
The exact status byte for a message of this type.
The status byte for a message of this type on channel 1, i.e. a status byte with the lower nibble set to zero.
The velocity of a note message (0 to 127).