aboutsummaryrefslogtreecommitdiffstats
path: root/ext/midi.lv2/midi.ttl
blob: b08ced50c305413a96276a7c51e969bec673afb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# LV2 MIDI Extension
# Copyright 2008-2011 David Robillard <d@drobilla.net>
# Copyright 2006 Lars Luthman <lars.luthman@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

@prefix midi:  <http://lv2plug.in/ns/ext/midi#> .
@prefix lv2:   <http://lv2plug.in/ns/lv2core#> .
@prefix lv2ev: <http://lv2plug.in/ns/ext/event#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix doap:  <http://usefulinc.com/ns/doap#> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .

<http://lv2plug.in/ns/ext/midi>
	a lv2:Specification ;
	doap:license <http://opensource.org/licenses/isc-license> ;
	doap:name "LV2 MIDI Events" ;
	rdfs:comment "Defines an LV2 event type for standard raw MIDI" ;
    doap:release [
        doap:revision "1.2" ;
        doap:created "2011-05-21"
    ] ;
	doap:maintainer [
		a foaf:Person ;
		foaf:name "David Robillard" ;
		foaf:homepage <http://drobilla.net/> ;
		rdfs:seeAlso <http://drobilla.net/drobilla.xrdf>
	] , [
		a foaf:Person ;
		foaf:name "Lars Luthman" ;
	] .

midi:MidiEvent a rdfs:Class ;
	rdfs:label      "LV2 MIDI event" ;
	rdfs:subClassOf lv2ev:Event ;
	lv2:documentation """
<p>A single raw (sequence of bytes) MIDI event.</p>

<p>These events are equivalent to standard MIDI events, with the following
restrictions to ease the burden on plugin authors:</p>
<ul>
  <li>Running status is not allowed. Every event must have its own status
    byte.</li>

  <li>Note On events with velocity 0 are not allowed. These events are
  equivalent to Note Off in standard MIDI streams, but in order to make
  plugins and hosts easier to write, as well as more efficient, only proper
  Note Off events are allowed as Note Off.</li>

  <li>"Realtime events" (status bytes 0xF8 to 0xFF) are allowed, but may
  not occur inside other events like they are allowed to in hardware MIDI
  streams.</li>

  <li>All events must be fully contained in a single data buffer, i.e. events
  may not "wrap around" by storing the first few bytes in one buffer and
  then wait for the next run() call to store the rest of the event. If
  there isn't enough space in the current data buffer to store an event,
  the event will either have to wait until next run() call, be ignored,
  or compensated for in some more clever way.</li>

  <li>All events must be valid MIDI events. 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.
  The MIDI writer (host or plugin) is responsible for writing valid MIDI
  events to the buffer, and the MIDI reader (plugin or host) can assume that
  all events are valid.</li>
</ul>
""" .