@prefix doap:      <http://usefulinc.com/ns/doap#> .
@prefix dc:        <http://purl.org/dc/terms/> .
@prefix foaf:      <http://xmlns.com/foaf/0.1/> .
@prefix rdf:       <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:      <http://www.w3.org/2000/01/rdf-schema#> .
@prefix lv2:       <http://lv2plug.in/ns/lv2core#> .
@prefix pp:        <http://lv2plug.in/ns/ext/port-props#> .
@prefix pg:        <http://lv2plug.in/ns/ext/port-groups#> .
@prefix ui:        <http://lv2plug.in/ns/extensions/ui#> .
@prefix units:     <http://lv2plug.in/ns/extensions/units#> .
@prefix atom:      <http://lv2plug.in/ns/ext/atom#> .
@prefix urid:      <http://lv2plug.in/ns/ext/urid#> .
@prefix opts:      <http://lv2plug.in/ns/ext/options#> .
@prefix rsz:       <http://lv2plug.in/ns/ext/resize-port#> .
@prefix time:      <http://lv2plug.in/ns/ext/time#> .
@prefix hcid:      <http://harrisonconsoles.com/lv2/inlinedisplay#> .
@prefix lsp:       <http://lsp-plug.in/plugins/lv2/> .
@prefix lsp_pg:    <http://lsp-plug.in/plugins/lv2/latency_meter/port_groups#> .
@prefix lsp_ui:    <http://lsp-plug.in/ui/lv2/> .
@prefix lsp_dev:   <http://lsp-plug.in/developers/> .


lsp_dev:s_tronci
	a foaf:Person ;
	foaf:name "Stefano Tronci" ;
	foaf:nick "CrocoDuck" ;
	foaf:mbox <mailto:crocoduck.oducks@gmail.com> ;
	foaf:homepage <https://thecrocoduckspond.wordpress.com/#s_tronci>
	.

lsp_dev:lsp
	a foaf:Person ;
	foaf:name "LSP LV2" ;
	foaf:homepage <http://lsp-plug.in/#lsp>
	.

lsp_pg:mono_in
	a pg:MonoGroup, pg:InputGroup ;
	lv2:symbol "mono_in";
	rdfs:label "Mono Input"
	.

lsp_pg:mono_out
	a pg:MonoGroup, pg:OutputGroup ;
	lv2:symbol "mono_out";
	rdfs:label "Mono Output"
	.

lsp:latency_meter
	a lv2:Plugin, doap:Project, lv2:AnalyserPlugin, lv2:UtilityPlugin ;
	doap:name "Latency Meter - Latenzmessgerät" ;
	lv2:minorVersion 0 ;
	lv2:microVersion 0 ;
	doap:developer lsp_dev:s_tronci ;
	doap:maintainer lsp_dev:lsp ;
	doap:license "LSP (Linux Studio Plugins)" ;
	lv2:binary <lsp-plugins-lv2.so> ;
	ui:ui lsp_ui:latency_meter ;

	lv2:requiredFeature urid:map ;
	lv2:optionalFeature lv2:hardRTCapable, hcid:queue_draw ;
	opts:supportedOption ui:updateRate ;
	dc:replaces <urn:ladspa:5002133> ;

	lv2:port [
		a lv2:InputPort, lv2:AudioPort ;
		lv2:index 0 ;
		lv2:symbol "in" ;
		lv2:name "Input" ;
		pg:group lsp_pg:mono_in ;
		lv2:designation pg:center ;
	] , [
		a lv2:OutputPort, lv2:AudioPort ;
		lv2:index 1 ;
		lv2:symbol "out" ;
		lv2:name "Output" ;
		pg:group lsp_pg:mono_out ;
		lv2:designation pg:center ;
	] , [
		a lv2:InputPort, lv2:ControlPort ;
		lv2:index 2 ;
		lv2:symbol "bypass" ;
		lv2:name "Bypass" ;
		lv2:portProperty lv2:toggled ;
		lv2:minimum 0 ;
		lv2:maximum 1 ;
		lv2:default 0 ;
	] , [
		a lv2:InputPort, lv2:ControlPort ;
		lv2:index 3 ;
		lv2:symbol "mlat" ;
		lv2:name "Max expected latency" ;
		units:unit units:ms ;
		lv2:portProperty pp:hasStrictBounds ;
		lv2:minimum 0.000000 ;
		lv2:maximum 2000.000000 ;
		lv2:default 1000.000000 ;
	] , [
		a lv2:InputPort, lv2:ControlPort ;
		lv2:index 4 ;
		lv2:symbol "pthr" ;
		lv2:name "Peak threshold" ;
		units:unit [
			a units:Unit ;
			rdfs:label "gain" ;
			units:symbol "G" ;
			units:render "%f G" ;
		] ;
		lv2:portProperty pp:hasStrictBounds ;
		lv2:minimum 0.000063 ;
		lv2:maximum 1.000000 ;
		lv2:default 0.063100 ;
	] , [
		a lv2:InputPort, lv2:ControlPort ;
		lv2:index 5 ;
		lv2:symbol "athr" ;
		lv2:name "Absolute threshold" ;
		units:unit [
			a units:Unit ;
			rdfs:label "gain" ;
			units:symbol "G" ;
			units:render "%f G" ;
		] ;
		lv2:portProperty pp:hasStrictBounds ;
		lv2:minimum 0.000063 ;
		lv2:maximum 1.000000 ;
		lv2:default 0.063100 ;
	] , [
		a lv2:InputPort, lv2:ControlPort ;
		lv2:index 6 ;
		lv2:symbol "gin" ;
		lv2:name "Input Gain" ;
		units:unit [
			a units:Unit ;
			rdfs:label "gain" ;
			units:symbol "G" ;
			units:render "%f G" ;
		] ;
		lv2:portProperty pp:logarithmic, pp:hasStrictBounds ;
		lv2:minimum 0.000000 ;
		lv2:maximum 10.000000 ;
		lv2:default 1.000000 ;
	] , [
		a lv2:InputPort, lv2:ControlPort ;
		lv2:index 7 ;
		lv2:symbol "fback" ;
		lv2:name "Feedback" ;
		lv2:portProperty lv2:toggled ;
		lv2:minimum 0 ;
		lv2:maximum 1 ;
		lv2:default 0 ;
	] , [
		a lv2:InputPort, lv2:ControlPort ;
		lv2:index 8 ;
		lv2:symbol "gout" ;
		lv2:name "Output Gain" ;
		units:unit [
			a units:Unit ;
			rdfs:label "gain" ;
			units:symbol "G" ;
			units:render "%f G" ;
		] ;
		lv2:portProperty pp:logarithmic, pp:hasStrictBounds ;
		lv2:minimum 0.000000 ;
		lv2:maximum 10.000000 ;
		lv2:default 1.000000 ;
	] , [
		a lv2:InputPort, lv2:ControlPort ;
		lv2:index 9 ;
		lv2:symbol "ttrig" ;
		lv2:name "Trig a Latency measurement" ;
		lv2:portProperty lv2:toggled ;
		lv2:minimum 0 ;
		lv2:maximum 1 ;
		lv2:default 0 ;
	] , [
		a lv2:OutputPort, lv2:ControlPort ;
		lv2:index 10 ;
		lv2:symbol "l_v" ;
		lv2:name "Latency Value" ;
		units:unit units:ms ;
		lv2:portProperty pp:hasStrictBounds ;
		lv2:minimum 0.000000 ;
		lv2:maximum 2000.000000 ;
		lv2:default 0.000000 ;
	] , [
		a lv2:OutputPort, lv2:ControlPort ;
		lv2:index 11 ;
		lv2:symbol "ilvl" ;
		lv2:name "Input Level" ;
		units:unit [
			a units:Unit ;
			rdfs:label "gain" ;
			units:symbol "G" ;
			units:render "%f G" ;
		] ;
		lv2:portProperty pp:logarithmic, pp:hasStrictBounds ;
		lv2:minimum 0.000000 ;
		lv2:maximum 20.000000 ;
		lv2:default 0.000000 ;
	] , [
		a lv2:InputPort, atom:AtomPort ;
		atom:bufferType atom:Sequence ;
		atom:supports atom:Sequence, time:Position ;
		lv2:designation lv2:control ;
		lv2:index 12 ;
		lv2:symbol "in_ui" ;
		lv2:name "UI Input" ;
		rdfs:comment "UI -> DSP communication" ;
		rsz:minimumSize 3072 ;
	] , [
		a lv2:OutputPort, atom:AtomPort ;
		atom:bufferType atom:Sequence ;
		atom:supports atom:Sequence, time:Position ;
		lv2:designation lv2:control ;
		lv2:index 13 ;
		lv2:symbol "out_ui" ;
		lv2:name "UI Output" ;
		rdfs:comment "DSP -> UI communication" ;
		rsz:minimumSize 3072 ;
	] , [
		a lv2:OutputPort, lv2:ControlPort ;
		lv2:index 14 ;
		lv2:symbol "out_latency" ;
		lv2:name "Latency OUT" ;
		rdfs:comment "DSP -> Host latency report" ;
		lv2:portProperty pp:hasStrictBounds ;
		lv2:portProperty lv2:integer ;
		lv2:portProperty lv2:reportsLatency ;
		lv2:minimum 0 ;
		lv2:maximum 192000 ;
		lv2:default 0 ;
	]
	.

lsp_ui:latency_meter
	a ui:X11UI ;
	lv2:minorVersion 0 ;
	lv2:microVersion 0 ;
	lv2:requiredFeature urid:map, ui:idleInterface ;
	lv2:optionalFeature ui:parent, ui:resize, ui:noUserResize ;
	ui:binary <lsp-plugins-lv2.so> ;

	ui:portNotification [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 2 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 3 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 4 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 5 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 6 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 7 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 8 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 9 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 10 ;
		ui:protocol ui:floatProtocol ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 11 ;
		ui:protocol ui:peakProtocol ;
	]  , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 12 ;
		ui:protocol atom:eventTransfer ;
		ui:notifyType atom:Sequence ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 13 ;
		ui:protocol atom:eventTransfer ;
		ui:notifyType atom:Sequence ;
	] , [
		ui:plugin lsp:latency_meter ;
		ui:portIndex 14 ;
		ui:protocol ui:floatProtocol ;
	]
	.

