From 2deb34ec442772f5f68c1818a290748ac5a1ed36 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 10 Feb 2013 03:21:20 +0000 Subject: Add lv2:Bank, lv2:Program, and lv2:program for describing programs, including but not limited to MIDI programs. --- plugins/eg-midigate.lv2/midigate.ttl | 80 ++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 plugins/eg-midigate.lv2/midigate.ttl (limited to 'plugins/eg-midigate.lv2/midigate.ttl') diff --git a/plugins/eg-midigate.lv2/midigate.ttl b/plugins/eg-midigate.lv2/midigate.ttl new file mode 100644 index 0000000..59ac815 --- /dev/null +++ b/plugins/eg-midigate.lv2/midigate.ttl @@ -0,0 +1,80 @@ +# The same set of namespace prefixes with two additions for LV2 extensions this +# plugin uses: atom and urid. + +@prefix atom: . +@prefix doap: . +@prefix lv2: . +@prefix midi: . +@prefix rdfs: . +@prefix urid: . + + + a lv2:Plugin ; + doap:name "Example MIDI Gate" ; + doap:license ; + lv2:project ; + lv2:requiredFeature urid:map ; + lv2:optionalFeature lv2:hardRTCapable ; +# Describe program banks so the host can automate and/or present a user +# interface. Describing supported programs (or any other MIDI event) is not +# required, but is a good idea since it allows hosts to make better use of +# plugins. This plugin has a single bank of two programs, which have a +# (mandatory) label, and an (optional) comment to describe their meaning in +# more detail. +# +# Both programs and the bank have an index, which corresponds to the MIDI bank +# and program numbers that will activate them. Since there are other ways to +# change programs (not used here), an index is not strictly required, but must +# be present to support program changes from MIDI. + lv2:bank [ + rdfs:label "Default" ; + lv2:index 0 ; + lv2:program [ + lv2:index 0 ; + rdfs:label "Normal" ; + rdfs:comment "Input is passed through if notes are active." + ] , [ + lv2:index 1 ; + rdfs:label "Inverted" ; + rdfs:comment "Input is passed through if no notes are active." + ] + ] ; +# This plugin has three ports. There is an audio input and output as before, +# as well as a new AtomPort. An AtomPort buffer contains an Atom, which is a +# generic container for any type of data. In this case, we want to receive +# MIDI events, so the (mandatory) +atom:bufferType+ is atom:Sequence, which is +# a series of events with time stamps. +# +# Events themselves are also generic and can contain any type of data, but in +# this case we are only interested in MIDI events. The (optional) +# +atom:supports+ property describes which event types are supported. Though +# not required, this information should always be given so the host knows what +# types of event it can expect the plugin to understand. +# +# The (optional) +lv2:designation+ of this port is +lv2:control+, which +# indicates that this is the "main" control port where the host should send +# events it expects to configure the plugin, in this case changing the MIDI +# program. This is necessary since it is possible to have several MIDI input +# ports, though typically it is best to have one. + lv2:port [ + a lv2:InputPort , + atom:AtomPort ; + atom:bufferType atom:Sequence ; + atom:supports midi:MidiEvent ; + lv2:designation lv2:control ; + lv2:index 0 ; + lv2:symbol "control" ; + lv2:name "Control" + ] , [ + a lv2:AudioPort , + lv2:InputPort ; + lv2:index 1 ; + lv2:symbol "in" ; + lv2:name "In" + ] , [ + a lv2:AudioPort , + lv2:OutputPort ; + lv2:index 2 ; + lv2:symbol "out" ; + lv2:name "Out" + ] . -- cgit v1.2.1