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.

Index

ClassesPropertiesFiles

Reference

Class midi:ActiveSense

Active Sense Message
Sub-class ofmidi:SystemRealtime
midi:status FE

Class midi:Aftertouch

Class midi:Bender

Class midi:ChannelPressure

Class midi:Chunk

MIDI Chunk

A series of contiguous bytes (usually one) in a message.

In domain ofmidi:byteNumber
midi:property

Class midi:Clock

Clock Message
Sub-class ofmidi:SystemRealtime
midi:status F8

Class midi:Continue

Continue Message
Sub-class ofmidi:SystemRealtime
midi:status FB

Class midi:Controller

Class midi:HexByte

Class midi:MidiEvent

MIDI 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 .
Sub-class ofev:Event
atom:Atom
In range ofmidi:binding
owl:onDatatype xsd:hexBinary

Class midi:NoteOff

Class midi:NoteOn

Class midi:ProgramChange

Class midi:QuarterFrame

Quarter Frame Message
Sub-class ofmidi:SystemCommon
midi:status F1

Class midi:Reset

Reset Message
Sub-class ofmidi:SystemRealtime
midi:status FF

Class midi:SongPosition

Class midi:SongSelect

Song Select Message
Sub-class ofmidi:SystemCommon
midi:status F3

Class midi:Start

Start Message
Sub-class ofmidi:SystemRealtime
midi:status FA

Class midi:Stop

Stop Message
Sub-class ofmidi:SystemRealtime
midi:status FC

Class midi:SystemCommon

System Common Message
Sub-class ofmidi:SystemMessage

Class midi:SystemExclusive

System Exclusive Message
Sub-class ofmidi:SystemMessage
midi:status F0

Class midi:SystemMessage

System Message
Sub-class ofmidi:MidiEvent
midi:statusMask F0

Class midi:SystemRealtime

System Realtime Message
Sub-class ofmidi:SystemMessage

Class midi:TuneRequest

Tune Request Message
Sub-class ofmidi:SystemCommon
midi:status F6

Class midi:VoiceMessage

Voice Message
Sub-class ofmidi:MidiEvent
midi:statusMask F0

Property midi:benderValue

bender value

The value of a pitch bender (-8192 to 8192).

OWL TypeDatatype Property
Rangexsd:short

Property midi:binding

binding

The MIDI event to bind a parameter to. This describes which MIDI events should be used to control a port, parameter, or other object. The binding should be a midi:MidiEvent but the property that represents the control value may be omitted. For example, to bind to the value of controller 17:

OWL TypeObject Property
Rangemidi:MidiEvent

Property midi:byteNumber

byte number

The 0-based index of a byte which is part of this chunk.

OWL TypeDatatype Property
Domainmidi:Chunk
Rangexsd:unsignedByte

Property midi:channel

MIDI channel

The channel number of a MIDI message.

OWL TypeDatatype Property
Rangexsd:unsignedByte

Property midi:chunk

MIDI chunk

A chunk of a MIDI message.

Rangexsd:byte
xsd:hexBinary

Property midi:controllerNumber

MIDI controller number

The numeric ID of a controller (0 to 127).

OWL TypeDatatype Property
Rangexsd:byte

Property midi:controllerValue

MIDI controller value

The value of a controller (0 to 127).

OWL TypeDatatype Property
Rangexsd:byte

Property midi:noteNumber

note number

The numeric ID of a note (0 to 127).

OWL TypeDatatype Property
Rangexsd:byte

Property midi:pressure

key pressure

Key pressure (0 to 127).

OWL TypeDatatype Property
Rangexsd:byte

Property midi:programNumber

program number

The numeric ID of a program (0 to 127).

OWL TypeDatatype Property
Rangexsd:byte

Property midi:property

property

The property this chunk represents.

OWL TypeObject Property
Domainmidi:Chunk
Rangerdf:Property

Property midi:songNumber

song number

The numeric ID of a song (0 to 127).

OWL TypeDatatype Property
Rangexsd:byte

Property midi:songPosition

song position

Song position in MIDI beats (16th notes) (-8192 to 8192).

OWL TypeDatatype Property
Rangexsd:short

Property midi:status

status byte

The exact status byte for a message of this type.

OWL TypeDatatype Property
Rangemidi:HexByte

Property midi:statusMask

status mask

The status byte for a message of this type on channel 1, i.e. a status byte with the lower nibble set to zero.

OWL TypeDatatype Property
Rangemidi:HexByte

Property midi:velocity

velocity

The velocity of a note message (0 to 127).

OWL TypeDatatype Property
Rangemidi:HexByte

History

Version 1.8 (2012-10-14)
  • Remove non-standard midi:Tick message type.
  • Add midi:binding and midi:channel predicates.
  • Add midi:HexByte datatype for status bytes and masks.
  • Use consistent label style.
  • Add C definitions for message types and standard controllers.
  • Fix definition of SystemExclusive status byte.
Version 1.6 (2012-04-17)
  • Merge with unified LV2 package.
  • Document how to serialise a MidiEvent to a string.
  • Add class definitions for various message types.
Version 1.4 (2011-11-21)
  • Update packaging.
  • Improve documentation.
Version 1.2 (2011-05-26)
  • Add build system for installation.
  • Switch to ISC license.
Version 1.0 (2010-10-04)
  • Initial release.