@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ingen: <http://drobilla.net/ns/ingen#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ui: <http://lv2plug.in/ns/extensions/ui#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

ingen:
	a owl:Ontology ;
	owl:imports <http://lv2plug.in/ns/lv2core> ;
	rdfs:label "Ingen Ontology" ;
	rdfs:comment """
Describes "graphs" of connected "blocks" (plugin instances) which process
audio, MIDI, and other signals or messages.""" .

ingen:Plugin
	a owl:Class ;
	rdfs:label "Plugin" ;
	rdfs:comment """
A class which can be instantiated into a ingen:Block.  A plugin has a set of input
and output "ports".  In practice this class is semantically equivalent to
lv2:Plugin, it only exists to allow the ingen ontology to be useful for
"plugins" that aren't semantically LV2 plugins.  See the LV2 specification
for details about the required properties (rdf:type, doap:name, doap:license,
and lv2:port).
""" .

ingen:Graph
	a owl:Class ;
	rdfs:subClassOf ingen:Plugin ;
	rdfs:label "Graph" ;
	rdfs:comment """
A collection of Blocks connected together form a Graph, which can itself be a
Block within a parent Graph, and so on.
""" .

ingen:canvasX
	a owl:DatatypeProperty ;
	rdfs:range xsd:decimal ;
	rdfs:label "canvas X" ;
	rdfs:comment "The X coordinate of an item on a canvas." .

ingen:canvasY
	a owl:DatatypeProperty ;
	rdfs:range xsd:decimal ;
	rdfs:label "canvas Y" ;
	rdfs:comment "The Y coordinate of an item on a canvas." .

ingen:block
	a owl:ObjectProperty ;
	rdfs:domain ingen:Graph ;
	rdfs:range ingen:Block ;
	rdfs:label "block" ;
	rdfs:comment "Signifies a graph contains some block." .

ingen:polyphony
	a owl:DatatypeProperty ;
	rdfs:domain ingen:Graph ;
	rdfs:range xsd:integer ;
	rdfs:label "Polyphony" ;
	rdfs:comment """
The amount of polyphony in a Graph.  This defines the number of voices
present on all :polyphonic children of this graph.  Because a Graph is
also a Block, a Graph may have both :polyphony and :polyphonic properties.
These specify different things: :polyphony specifies the voice count
of the Graph's children, and :polyphonic specifies whether the graph is
seen as polyphonic to the Graph's parent.
""" .

ingen:value
	a owl:DatatypeProperty ;
	rdfs:domain lv2:Port ;
	rdfs:label "Value" ;
	rdfs:comment "The current value of a port." .

ingen:Node
	a owl:Class ;
	rdfs:label "Ingen Node" ;
	rdfs:comment """
An element of a Graph.  A Node always has a valid path and symbol, with the
possible exception of the root graph which may not have a symbol depending on
context.  Ingen uses restricted paths and/or URIs built from valid lv2:symbol
components, so the symbol of a Node may be inferred from its URI if no explicit
lv2:symbol property is given.
""" .

ingen:polyphonic
	a owl:DatatypeProperty ;
	rdfs:range xsd:boolean ;
	rdfs:label "Polyphonic" ;
	rdfs:comment """
Signifies this node should be replicated when it is part of a polyphonic graph.
The amount of polyphony (i.e. the number of voices) is determined by the
ingen:polyphony property of the containing graph.  This is a boolean property
which defines whether the parent can access each voice individually: All nodes
within a graph are either polyphonic or not from their parent's perspective.
An Node may itself have "internal" polyphony but not be polyphonic according to
this property, if those voices are mixed down.  """ .

ingen:Block
	a owl:Class ;
	rdfs:subClassOf ingen:Node ,
		lv2:PluginBase ;
	rdfs:label "Block" ;
	rdfs:comment """
An instance of a Plugin.  Since a Graph is a Plugin, an instance of a Graph
is also a Block.  A Block inherits all the properties of the plugin of which
it is an instance, but may have properties of its own: any properties of
the block take precedence over properties of the block's plugin.  This way a
block can be expressed as a lightweight set of changes (e.g. input values)
from its plugin or graph which may be defined elsewhere.

A block MUST have at least one ingen:prototype property which is a subclass
of :Plugin.  When there are many such properties, an applications SHOULD
use the most specific class it understands.
""" .

ingen:enabled
	a owl:DatatypeProperty ;
	rdfs:domain ingen:Block ;
	rdfs:range xsd:boolean ;
	rdfs:label "enabled" ;
	rdfs:comment "Signifies the block is or should be running." .

ingen:prototype
	a owl:ObjectProperty ;
	rdfs:domain ingen:Block ;
	rdfs:label "prototype" ;
	rdfs:comment """
The object which this block is an instance of, or derived from.
""" .

ingen:Arc
	a owl:Class ;
	rdfs:label "Arc" ;
	rdfs:comment """
A connection between two ports.  Graphs have a set of arcs which
define how its component blocks and ports are connected.  An Arc MUST
have exactly one ingen:tail and exactly one ingen:head property.
""" .

ingen:arc
	a owl:ObjectProperty ;
	rdfs:domain ingen:Graph ;
	rdfs:range ingen:Arc ;
	rdfs:comment "An arc contained in this graph." .

ingen:tail
	a owl:ObjectProperty ,
		owl:FunctionalProperty ;
	rdfs:domain ingen:Arc ;
	rdfs:range lv2:Port ;
	rdfs:label "tail" ;
	rdfs:comment "The source/sending port of this arc" .

ingen:head
	a owl:ObjectProperty ,
		owl:FunctionalProperty ;
	rdfs:domain ingen:Arc ;
	rdfs:range lv2:Port ;
	rdfs:label "head" ;
	rdfs:comment "The destination/receiving/sink port of this arc" .

ingen:incidentTo
	a owl:ObjectProperty ,
		owl:FunctionalProperty ;
	rdfs:domain ingen:Arc ;
	rdfs:label "incident to" ;
	rdfs:comment "A special property used to describe any arc incident to a port or block.  This is never saved in graph files, but is used in the control protocol to completely disconnect a Block or Port." .