@prefix amb:  <http://ambisonics.ch/standards/channels/> .
@prefix lv2:  <http://lv2plug.in/ns/lv2core#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix pg:   <http://lv2plug.in/ns/ext/port-groups#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<http://lv2plug.in/ns/ext/port-groups>
	a owl:Ontology ;
	rdfs:seeAlso <../../meta/meta.ttl> ,
		<lv2-port-groups.doap.ttl> .

pg:Group
	a rdfs:Class ;
	rdfs:label "Port Group" ;
	rdfs:subClassOf [
		a owl:Restriction ;
		owl:onProperty lv2:symbol ;
		owl:cardinality 1 ;
		rdfs:comment """A pg:Group MUST have exactly one string lv2:symbol.

This symbol must be unique according to the same rules as the lv2:symbol for an lv2:Port, where group symbols and port symbols reside in the same namespace.  In other words, a group on a plugin MUST NOT have the same symbol as another group or a port on that plugin.  This makes it possible to uniquely reference a port or group on a plugin with a single identifier and no context."""
	] ;
	rdfs:comment """A set of ports/channels/controls/etc that are are logically grouped together,
e.g. two audio ports in a group may form a stereo stream.

In order to avoid the need to define large numbers of identical group definitions, a group definition may be shared.  For example, a plugin collection may define a single URI for a pg:StereoGroup with the symbol "input" and use it in many plugins.""" .

pg:InputGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:Group ;
	rdfs:label "Input Group" ;
	rdfs:comment "A group which contains exclusively inputs." .

pg:OutputGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:Group ;
	rdfs:label "Output Group" ;
	rdfs:comment "A group which contains exclusively outputs." .

pg:Element
	a rdfs:Class ;
	rdfs:label "Element" ;
	rdfs:comment "An ordered element of a group." ;
	rdfs:subClassOf [
		a owl:Restriction ;
		owl:onProperty lv2:designation ;
		owl:cardinality 1 ;
		rdfs:comment "An element MUST have exactly one lv2:designation."
	] ;
	rdfs:comment "An element of a group, which has a designation and an optional index." .

pg:element
	a rdf:Property ,
		owl:ObjectProperty ;
	rdfs:range pg:Element ;
	rdfs:label "element" ;
	rdfs:comment """Indicates that a group has a certain element (a parameter or channel designation with a possible index).""" .

pg:sideChainOf
	a rdf:Property ,
		owl:ObjectProperty ;
	rdfs:label "side-chain of" ;
	rdfs:comment """Indicates that this port or group should be considered a "side chain" of some other port or group.  The precise definition of "side chain" depends on the plugin, but in general this group should be considered a modifier to some other group, rather than an independent input itself.""" .

pg:subGroupOf
	a rdf:Property ,
		owl:ObjectProperty ,
		owl:FunctionalProperty ;
	rdfs:domain pg:Group ;
	rdfs:range pg:Group ;
	rdfs:label "sub-group of" ;
	rdfs:comment """Indicates that this group is a child of another group.  This property has no meaning with respect to plugin execution, but the host may find this information useful (e.g. to provide a compact user interface).  Note that being a sub-group does not relax the restriction that the group MUST have a unique symbol with respect to the plugin.""" .

pg:source
	a rdf:Property ,
		owl:ObjectProperty ;
	rdfs:domain pg:OutputGroup ;
	rdfs:range pg:InputGroup ;
	rdfs:label "source" ;
	rdfs:comment """Indicates that this port or group should be considered the "result" of some other port or group.  This property only makes sense on groups with outputs when the source is a group with inputs.  This can be used to convey a relationship between corresponding input and output groups with different types, e.g. a mono->stereo plugin.""" .

pg:mainInput
	a rdf:Property ,
		owl:ObjectProperty ,
		owl:FunctionalProperty ;
	rdfs:domain lv2:Plugin ;
	rdfs:range pg:InputGroup ;
	rdfs:label "main input" ;
	rdfs:comment """Indicates that this group should be considered the "main" input, i.e. the primary task is processing the signal in this group.  A plugin MUST NOT have more than one pg:mainInput property.""" .

pg:mainOutput
	a rdf:Property ,
		owl:ObjectProperty ,
		owl:FunctionalProperty ;
	rdfs:domain lv2:Plugin ;
	rdfs:range pg:OutputGroup ;
	rdfs:label "main output" ;
	rdfs:comment """Indicates that this group should be considered the "main" output.  The main output group SHOULD have the main input group as a pg:source.""" .

pg:group
	a rdf:Property ,
		owl:ObjectProperty ,
		owl:FunctionalProperty ;
	rdfs:domain lv2:Port ;
	rdfs:range pg:Group ;
	rdfs:label "group" ;
	rdfs:comment """Indicates that this port is a part of a group of ports on the plugin.  The port should also have an lv2:designation property to define its designation within that group.""" .

pg:DiscreteGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:Group ;
	rdfs:comment """Discrete channel configurations.  These groups are divided into channels where each represents a particular speaker location.  The position of sound in one of these groups depends on a particular speaker configuration.""" .

pg:left
	a lv2:Channel ;
	rdfs:label "left" .

pg:right
	a lv2:Channel ;
	rdfs:label "right" .

pg:center
	a lv2:Channel ;
	rdfs:label "center" .

pg:side
	a lv2:Channel ;
	rdfs:label "side" .

pg:centerLeft
	a lv2:Channel ;
	rdfs:label "center left" .

pg:centerRight
	a lv2:Channel ;
	rdfs:label "center right" .

pg:sideLeft
	a lv2:Channel ;
	rdfs:label "side left" .

pg:sideRight
	a lv2:Channel ;
	rdfs:label "side right" .

pg:rearLeft
	a lv2:Channel ;
	rdfs:label "rear left" .

pg:rearRight
	a lv2:Channel ;
	rdfs:label "rear right" .

pg:rearCenter
	a lv2:Channel ;
	rdfs:label "rear center" .

pg:lowFrequencyEffects
	a lv2:Channel ;
	rdfs:label "low-frequency effects" .

pg:MonoGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "Mono" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:center
	] .

pg:StereoGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "Stereo" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:left
	] , [
		lv2:index 1 ;
		lv2:designation pg:right
	] .

pg:MidSideGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "Mid-Side Stereo" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:center
	] , [
		lv2:index 1 ;
		lv2:designation pg:side
	] .

pg:ThreePointZeroGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "3.0 Surround" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:left
	] , [
		lv2:index 1 ;
		lv2:designation pg:right
	] , [
		lv2:index 2 ;
		lv2:designation pg:rearCenter
	] .

pg:FourPointZeroGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "4.0 Surround (Quadraphonic)" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:left
	] , [
		lv2:index 1 ;
		lv2:designation pg:center
	] , [
		lv2:index 2 ;
		lv2:designation pg:right
	] , [
		lv2:index 3 ;
		lv2:designation pg:rearCenter
	] .

pg:FivePointZeroGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "5.0 Surround (3-2 stereo)" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:left
	] , [
		lv2:index 1 ;
		lv2:designation pg:center
	] , [
		lv2:index 2 ;
		lv2:designation pg:right
	] , [
		lv2:index 3 ;
		lv2:designation pg:rearLeft
	] , [
		lv2:index 4 ;
		lv2:designation pg:rearRight
	] .

pg:FivePointOneGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "5.1 Surround (3-2 stereo)" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:left
	] , [
		lv2:index 1 ;
		lv2:designation pg:center
	] , [
		lv2:index 2 ;
		lv2:designation pg:right
	] , [
		lv2:index 3 ;
		lv2:designation pg:rearLeft
	] , [
		lv2:index 4 ;
		lv2:designation pg:rearRight
	] , [
		lv2:index 5 ;
		lv2:designation pg:lowFrequencyEffects
	] .

pg:SixPointOneGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "6.1 Surround" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:left
	] , [
		lv2:index 1 ;
		lv2:designation pg:center
	] , [
		lv2:index 2 ;
		lv2:designation pg:right
	] , [
		lv2:index 3 ;
		lv2:designation pg:sideLeft
	] , [
		lv2:index 4 ;
		lv2:designation pg:sideRight
	] , [
		lv2:index 5 ;
		lv2:designation pg:rearCenter
	] , [
		lv2:index 6 ;
		lv2:designation pg:lowFrequencyEffects
	] .

pg:SevenPointOneGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "7.1 Surround" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:left
	] , [
		lv2:index 1 ;
		lv2:designation pg:center
	] , [
		lv2:index 2 ;
		lv2:designation pg:right
	] , [
		lv2:index 3 ;
		lv2:designation pg:sideLeft
	] , [
		lv2:index 4 ;
		lv2:designation pg:sideRight
	] , [
		lv2:index 5 ;
		lv2:designation pg:rearLeft
	] , [
		lv2:index 6 ;
		lv2:designation pg:rearRight
	] , [
		lv2:index 7 ;
		lv2:designation pg:lowFrequencyEffects
	] .

pg:SevenPointOneWideGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:DiscreteGroup ;
	rdfs:label "7.1 Surround (Wide)" ;
	pg:element [
		lv2:index 0 ;
		lv2:designation pg:left
	] , [
		lv2:index 1 ;
		lv2:designation pg:centerLeft
	] , [
		lv2:index 2 ;
		lv2:designation pg:center
	] , [
		lv2:index 3 ;
		lv2:designation pg:centerRight
	] , [
		lv2:index 4 ;
		lv2:designation pg:right
	] , [
		lv2:index 5 ;
		lv2:designation pg:rearLeft
	] , [
		lv2:index 6 ;
		lv2:designation pg:rearRight
	] , [
		lv2:index 7 ;
		lv2:designation pg:lowFrequencyEffects
	] .

amb:ACN0
	a lv2:Channel .

amb:ACN1
	a lv2:Channel .

amb:ACN2
	a lv2:Channel .

amb:ACN3
	a lv2:Channel .

amb:ACN4
	a lv2:Channel .

amb:ACN5
	a lv2:Channel .

amb:ACN6
	a lv2:Channel .

amb:ACN7
	a lv2:Channel .

amb:ACN8
	a lv2:Channel .

amb:ACN9
	a lv2:Channel .

amb:ACN10
	a lv2:Channel .

amb:ACN11
	a lv2:Channel .

amb:ACN12
	a lv2:Channel .

amb:ACN13
	a lv2:Channel .

amb:ACN14
	a lv2:Channel .

amb:ACN15
	a lv2:Channel .

pg:AmbisonicGroup
	a rdfs:Class ;
	rdfs:subClassOf pg:Group ;
	rdfs:comment """Ambisonic channel configurations.  These groups are divided into channels which together represent a position in an abstract n-dimensional space. The position of sound in one of these groups does not depend on a particular speaker configuration; a decoder can be used to convert an ambisonic stream for any speaker configuration.""" .

pg:AmbisonicBH1P0Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 1 and peripheral order 0." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN3
	] .

pg:AmbisonicBH1P1Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 1 and peripheral order 1." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN2
	] , [
		lv2:index 3 ;
		lv2:designation amb:ACN3
	] .

pg:AmbisonicBH2P0Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 2 and peripheral order 0." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN3
	] , [
		lv2:index 3 ;
		lv2:designation amb:ACN4
	] , [
		lv2:index 4 ;
		lv2:designation amb:ACN8
	] .

pg:AmbisonicBH2P1Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 2 and peripheral order 1." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN2
	] , [
		lv2:index 3 ;
		lv2:designation amb:ACN3
	] , [
		lv2:index 4 ;
		lv2:designation amb:ACN4
	] , [
		lv2:index 5 ;
		lv2:designation amb:ACN8
	] .

pg:AmbisonicBH2P2Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 2 and peripheral order 2." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN2
	] , [
		lv2:index 3 ;
		lv2:designation amb:ACN3
	] , [
		lv2:index 4 ;
		lv2:designation amb:ACN4
	] , [
		lv2:index 5 ;
		lv2:designation amb:ACN5
	] , [
		lv2:index 6 ;
		lv2:designation amb:ACN6
	] , [
		lv2:index 7 ;
		lv2:designation amb:ACN7
	] , [
		lv2:index 8 ;
		lv2:designation amb:ACN8
	] .

pg:AmbisonicBH3P0Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 3 and peripheral order 0." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN3
	] , [
		lv2:index 3 ;
		lv2:designation amb:ACN4
	] , [
		lv2:index 4 ;
		lv2:designation amb:ACN8
	] , [
		lv2:index 5 ;
		lv2:designation amb:ACN9
	] , [
		lv2:index 6 ;
		lv2:designation amb:ACN15
	] .

pg:AmbisonicBH3P1Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 3 and peripheral order 1." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN2
	] , [
		lv2:index 3 ;
		lv2:designation amb:ACN3
	] , [
		lv2:index 4 ;
		lv2:designation amb:ACN4
	] , [
		lv2:index 5 ;
		lv2:designation amb:ACN8
	] , [
		lv2:index 6 ;
		lv2:designation amb:ACN9
	] , [
		lv2:index 7 ;
		lv2:designation amb:ACN15
	] .

pg:AmbisonicBH3P2Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 3 and peripheral order 2." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN2
	] , [
		lv2:index 3 ;
		lv2:designation amb:ACN3
	] , [
		lv2:index 4 ;
		lv2:designation amb:ACN4
	] , [
		lv2:index 5 ;
		lv2:designation amb:ACN5
	] , [
		lv2:index 6 ;
		lv2:designation amb:ACN6
	] , [
		lv2:index 7 ;
		lv2:designation amb:ACN7
	] , [
		lv2:index 8 ;
		lv2:designation amb:ACN8
	] , [
		lv2:index 9 ;
		lv2:designation amb:ACN9
	] , [
		lv2:index 10 ;
		lv2:designation amb:ACN15
	] .

pg:AmbisonicBH3P3Group
	a rdfs:Class ;
	rdfs:subClassOf pg:AmbisonicGroup ;
	rdfs:label "Ambisonic B stream of horizontal order 3 and peripheral order 3." ;
	pg:element [
		lv2:index 0 ;
		lv2:designation amb:ACN0
	] , [
		lv2:index 1 ;
		lv2:designation amb:ACN1
	] , [
		lv2:index 2 ;
		lv2:designation amb:ACN2
	] , [
		lv2:index 3 ;
		lv2:designation amb:ACN3
	] , [
		lv2:index 4 ;
		lv2:designation amb:ACN4
	] , [
		lv2:index 5 ;
		lv2:designation amb:ACN5
	] , [
		lv2:index 6 ;
		lv2:designation amb:ACN6
	] , [
		lv2:index 7 ;
		lv2:designation amb:ACN7
	] , [
		lv2:index 8 ;
		lv2:designation amb:ACN8
	] , [
		lv2:index 9 ;
		lv2:designation amb:ACN9
	] , [
		lv2:index 10 ;
		lv2:designation amb:ACN10
	] , [
		lv2:index 11 ;
		lv2:designation amb:ACN11
	] , [
		lv2:index 12 ;
		lv2:designation amb:ACN12
	] , [
		lv2:index 13 ;
		lv2:designation amb:ACN13
	] , [
		lv2:index 14 ;
		lv2:designation amb:ACN14
	] , [
		lv2:index 15 ;
		lv2:designation amb:ACN15
	] .
