midi
type: Specification
license: isc
name: LV2 MIDI
shortdesc: A normalised definition of raw MIDI.
maintainer: me
developer: larsl
developer: me
release:
  revision: 1.5
  created: 2012-02-19
  blame: me
  changeset:
    item: Add class definitions for various message types.
release:
  revision: 1.4
  created: 2011-11-21
  file-release: lv2-midi-1.4.tar.bz2
  blame: me
  changeset:
    item: Update packaging.
    item: Improve documentation.
release:
  revision: 1.2
  created: 2011-05-26
  file-release: lv2-midi-1.2.tar.bz2
  blame: me
  changeset:
    item: Add build system for installation.
    item: Switch to ISC license.
release:
  revision: 1.0
  created: 2010-10-04
  file-release: lv2-midi-1.0.tar.gz
  blame: me
  changeset:
    item: Initial release.
documentation: This extension 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 machine readable description of the MIDI standard (except for standard controller numbers). These descriptions are detailed enough to express any MIDI message in RDF. Message types are described down to the byte level, so all the information required to convert between binary MIDI and RDF MIDI is present. This specification thus serves as both a human and machine readable description of the MIDI specification.

Active sense message.
type: Class
subclass of: System realtime message.

Aftertouch (note pressure) message.
type: Class
subclass of: Voice message.
chunk:
  byte number: 0
  property: noteNumber
chunk:
  byte number: 1
  property: pressure

Bender (pitch wheel) message.
type: Class
subclass of: Voice message.
chunk:
  byte number: 0
  byte number: 1
  property: benderValue

Channel pressure message.
type: Class
subclass of: Voice message.
chunk:
  byte number: 0
  property: pressure

Chunk
type: Class
comment: A series of contiguous bytes (usually one) in a message.

Clock message.
type: Class
subclass of: System realtime message.

Continue message.
type: Class
subclass of: System realtime message.

Controller change message.
type: Class
subclass of: Voice message.
chunk:
  byte number: 0
  property: controllerNumber
chunk:
  byte number: 1
  property: controllerValue

MIDI message.
type: Class
subclass of: Event
subclass of: Atom
documentation: 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.

Note off message.
type: Class
subclass of: Voice message.
chunk:
  byte number: 0
  property: noteNumber
chunk:
  byte number: 1
  property: velocity

Note on message.
type: Class
subclass of: Voice message.
chunk:
  byte number: 0
  property: noteNumber
chunk:
  byte number: 1
  property: velocity

Program change message.
type: Class
subclass of: Voice message.
chunk:
  byte number: 0
  property: programNumber

MTC quarter frame message.
type: Class
subclass of: System common message.

Reset message.
type: Class
subclass of: System realtime message.

Song position pointer message.
type: Class
subclass of: System common message.
chunk:
  byte number: 0
  byte number: 1
  property: songPosition

Song select message.
type: Class
subclass of: System common message.

Start message.
type: Class
subclass of: System realtime message.

Stop message.
type: Class
subclass of: System realtime message.

System common message.
type: Class
subclass of: System message.

System exclusive message.
type: Class
subclass of: System message.

System message.
type: Class
subclass of: MIDI message.

System realtime message.
type: Class
subclass of: System message.

Tick message.
type: Class
subclass of: System realtime message.

Tune request message.
type: Class
subclass of: System common message.

Voice message.
type: Class
subclass of: MIDI message.

benderValue
type: Property
range: short
comment: The value of a pitch bender (-8192 to 8192).

byteNumber
type: Property
domain: Chunk
range: unsignedByte
comment: The 0-based index of a byte which is part of this chunk.

chunk
type: Property
range: byte
range: hexBinary
comment: The exact status byte for a message of this type.

controllerNumber
type: Property
range: byte
comment: The numberic ID of a controller (0 to 127).

controllerValue
type: Property
range: byte
comment: The value of a controller (0 to 127).

noteNumber
type: Property
range: byte
comment: The numeric ID of a controller (0 to 127).

pressure
type: Property
range: byte
comment: Key pressure (0 to 127).

programNumber
type: Property
range: byte
comment: The numeric ID of a program (0 to 127).

property
type: Property
domain: Chunk
range: Property
comment: The property this chunk represents.

songNumber
type: Property
range: byte
comment: The numeric ID of a song (0 to 127).

songPosition
type: Property
range: short
comment: Song position in MIDI beats (16th notes) (-8192 to 8192).

status
type: Property
range: byte
range: hexBinary
comment: The exact status byte for a message of this type.

statusMask
type: Property
range: byte
range: hexBinary
comment: The status byte for a message of this type on channel 1, i.e. a status byte with the lower nibble set to zero.

velocity
type: Property
range: byte
comment: The velocity of a note message (0 to 127).