From 4db67120efca2d4c200d2e1ba5cf3d7b97cab97e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 22 Sep 2018 20:38:01 +0200 Subject: Install standard headers to simpler include paths --- lv2/midi/midi.ttl | 397 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 397 insertions(+) create mode 100644 lv2/midi/midi.ttl (limited to 'lv2/midi/midi.ttl') diff --git a/lv2/midi/midi.ttl b/lv2/midi/midi.ttl new file mode 100644 index 0000000..23e41b3 --- /dev/null +++ b/lv2/midi/midi.ttl @@ -0,0 +1,397 @@ +@prefix atom: . +@prefix ev: . +@prefix lv2: . +@prefix midi: . +@prefix owl: . +@prefix rdf: . +@prefix rdfs: . +@prefix xsd: . + + + a owl:Ontology ; + rdfs:seeAlso , + ; + lv2:documentation """ +

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.

+""" . + +midi:ActiveSense + a rdfs:Class ; + rdfs:subClassOf midi:SystemRealtime ; + rdfs:label "Active Sense Message" ; + midi:status "FE"^^xsd:hexBinary . + +midi:Aftertouch + a rdfs:Class ; + rdfs:subClassOf midi:VoiceMessage ; + rdfs:label "Aftertouch Message" ; + midi:statusMask "A0"^^xsd:hexBinary ; + midi:chunk [ + midi:byteNumber 0 ; + midi:property midi:noteNumber + ] , [ + midi:byteNumber 1 ; + midi:property midi:pressure + ] . + +midi:Bender + a rdfs:Class ; + rdfs:subClassOf midi:VoiceMessage ; + rdfs:label "Bender Message" ; + midi:statusMask "E0"^^xsd:hexBinary ; + midi:chunk [ + midi:byteNumber 0 , + 1 ; + midi:property midi:benderValue + ] . + +midi:ChannelPressure + a rdfs:Class ; + rdfs:subClassOf midi:VoiceMessage ; + rdfs:label "Channel Pressure Message" ; + midi:statusMask "D0"^^xsd:hexBinary ; + midi:chunk [ + midi:byteNumber 0 ; + midi:property midi:pressure + ] . + +midi:Chunk + a rdfs:Class ; + rdfs:label "MIDI Chunk" ; + rdfs:comment "A series of contiguous bytes (usually one) in a message." . + +midi:Clock + a rdfs:Class ; + rdfs:subClassOf midi:SystemRealtime ; + rdfs:label "Clock Message" ; + midi:status "F8"^^xsd:hexBinary . + +midi:Continue + a rdfs:Class ; + rdfs:subClassOf midi:SystemRealtime ; + rdfs:label "Continue Message" ; + midi:status "FB"^^xsd:hexBinary . + +midi:Controller + a rdfs:Class ; + rdfs:subClassOf midi:VoiceMessage ; + rdfs:label "Controller Change Message" ; + midi:statusMask "B0"^^xsd:hexBinary ; + midi:chunk [ + midi:byteNumber 0 ; + midi:property midi:controllerNumber + ] , [ + midi:byteNumber 1 ; + midi:property midi:controllerValue + ] . + +midi:HexByte + a rdfs:Datatype ; + owl:onDatatype xsd:hexBinary ; + owl:withRestrictions ( + [ + xsd:maxInclusive "FF" + ] + ) ; + rdfs:comment "A hexadecimal byte, which is a xsd:hexBinary value <= FF" . + +midi:MidiEvent + a rdfs:Class , + rdfs:Datatype ; + rdfs:label "MIDI Message" ; + rdfs:subClassOf ev:Event , + atom:Atom ; + owl:onDatatype xsd:hexBinary ; + lv2: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.
  • +
+ +

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 .
+
+""" . + +midi:NoteOff + a rdfs:Class ; + rdfs:subClassOf midi:VoiceMessage ; + rdfs:label "Note Off Message" ; + midi:statusMask "80"^^xsd:hexBinary ; + midi:chunk [ + midi:byteNumber 0 ; + midi:property midi:noteNumber + ] , [ + midi:byteNumber 1 ; + midi:property midi:velocity + ] . + +midi:NoteOn + a rdfs:Class ; + rdfs:subClassOf midi:VoiceMessage ; + rdfs:label "Note On Message" ; + midi:statusMask "90"^^xsd:hexBinary ; + midi:chunk [ + midi:byteNumber 0 ; + midi:property midi:noteNumber + ] , [ + midi:byteNumber 1 ; + midi:property midi:velocity + ] . + +midi:ProgramChange + a rdfs:Class ; + rdfs:subClassOf midi:VoiceMessage ; + rdfs:label "Program Change Message" ; + midi:statusMask "C0"^^xsd:hexBinary ; + midi:chunk [ + midi:byteNumber 0 ; + midi:property midi:programNumber + ] . + +midi:QuarterFrame + a rdfs:Class ; + rdfs:subClassOf midi:SystemCommon ; + rdfs:label "Quarter Frame Message" ; + midi:status "F1"^^xsd:hexBinary . + +midi:Reset + a rdfs:Class ; + rdfs:subClassOf midi:SystemRealtime ; + rdfs:label "Reset Message" ; + midi:status "FF"^^xsd:hexBinary . + +midi:SongPosition + a rdfs:Class ; + rdfs:subClassOf midi:SystemCommon ; + rdfs:label "Song Position Pointer Message" ; + midi:status "F2"^^xsd:hexBinary ; + midi:chunk [ + midi:byteNumber 0 , + 1 ; + midi:property midi:songPosition + ] . + +midi:SongSelect + a rdfs:Class ; + rdfs:subClassOf midi:SystemCommon ; + rdfs:label "Song Select Message" ; + midi:status "F3"^^xsd:hexBinary . + +midi:Start + a rdfs:Class ; + rdfs:subClassOf midi:SystemRealtime ; + rdfs:label "Start Message" ; + midi:status "FA"^^xsd:hexBinary . + +midi:Stop + a rdfs:Class ; + rdfs:subClassOf midi:SystemRealtime ; + rdfs:label "Stop Message" ; + midi:status "FC"^^xsd:hexBinary . + +midi:SystemCommon + a rdfs:Class ; + rdfs:subClassOf midi:SystemMessage ; + rdfs:label "System Common Message" . + +midi:SystemExclusive + a rdfs:Class ; + rdfs:subClassOf midi:SystemMessage ; + rdfs:label "System Exclusive Message" ; + midi:status "F0"^^xsd:hexBinary . + +midi:SystemMessage + a rdfs:Class ; + rdfs:subClassOf midi:MidiEvent ; + rdfs:label "System Message" ; + midi:statusMask "F0"^^xsd:hexBinary . + +midi:SystemRealtime + a rdfs:Class ; + rdfs:subClassOf midi:SystemMessage ; + rdfs:label "System Realtime Message" . + +midi:TuneRequest + a rdfs:Class ; + rdfs:subClassOf midi:SystemCommon ; + rdfs:label "Tune Request Message" ; + midi:status "F6"^^xsd:hexBinary . + +midi:VoiceMessage + a rdfs:Class ; + rdfs:subClassOf midi:MidiEvent ; + rdfs:label "Voice Message" ; + midi:statusMask "F0"^^xsd:hexBinary . + +midi:benderValue + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "bender value" ; + rdfs:range xsd:short ; + rdfs:comment "The value of a pitch bender (-8192 to 8192)." . + +midi:binding + a rdf:Property , + owl:ObjectProperty ; + rdfs:range midi:MidiEvent ; + rdfs:label "binding" ; + lv2:documentation """ +

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:

+ +
+port midi:binding [
+    a midi:Controller ;
+    midi:controllerNumber 17
+] .
+
+""" . + +midi:byteNumber + a rdf:Property , + owl:DatatypeProperty ; + rdfs:label "byte number" ; + rdfs:domain midi:Chunk ; + rdfs:range xsd:unsignedByte ; + rdfs:comment "The 0-based index of a byte which is part of this chunk." . + +midi:channel + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "MIDI channel" ; + rdfs:range xsd:unsignedByte ; + rdfs:comment "The channel number of a MIDI message." . + +midi:chunk + a rdf:Property ; + rdfs:range midi:Chunk ; + rdfs:label "MIDI chunk" ; + rdfs:comment "A chunk of a MIDI message." . + +midi:controllerNumber + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "MIDI controller number" ; + rdfs:range xsd:byte ; + rdfs:comment "The numeric ID of a controller (0 to 127)." . + +midi:controllerValue + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "MIDI controller value" ; + rdfs:range xsd:byte ; + rdfs:comment "The value of a controller (0 to 127)." . + +midi:noteNumber + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "note number" ; + rdfs:range xsd:byte ; + rdfs:comment "The numeric ID of a note (0 to 127)." . + +midi:pressure + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "key pressure" ; + rdfs:range xsd:byte ; + rdfs:comment "Key pressure (0 to 127)." . + +midi:programNumber + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "program number" ; + rdfs:range xsd:byte ; + rdfs:comment "The numeric ID of a program (0 to 127)." . + +midi:property + a rdf:Property , + owl:ObjectProperty , + owl:FunctionalProperty ; + rdfs:label "property" ; + rdfs:domain midi:Chunk ; + rdfs:range rdf:Property ; + rdfs:comment "The property this chunk represents." . + +midi:songNumber + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "song number" ; + rdfs:range xsd:byte ; + rdfs:comment "The numeric ID of a song (0 to 127)." . + +midi:songPosition + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "song position" ; + rdfs:range xsd:short ; + rdfs:comment "Song position in MIDI beats (16th notes) (-8192 to 8192)." . + +midi:status + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "status byte" ; + rdfs:range midi:HexByte ; + rdfs:comment "The exact status byte for a message of this type." . + +midi:statusMask + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "status mask" ; + rdfs:range midi:HexByte ; + rdfs: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.""" . + +midi:velocity + a rdf:Property , + owl:DatatypeProperty , + owl:FunctionalProperty ; + rdfs:label "velocity" ; + rdfs:range midi:HexByte ; + rdfs:comment "The velocity of a note message (0 to 127)." . -- cgit v1.2.1