@prefix blop: <http://drobilla.net/plugins/blop/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix morph: <http://lv2plug.in/ns/ext/morph#> .
@prefix opts: <http://lv2plug.in/ns/ext/options#> .
@prefix urid: <http://lv2plug.in/ns/ext/urid#> .
@prefix units: <http://lv2plug.in/ns/extensions/units#> .

blop:dahdsr
	a lv2:Plugin ,
		lv2:EnvelopePlugin ;
	lv2:project blop: ;
	lv2:symbol "dahdsr" ;
	lv2:microVersion 0 ;
	lv2:minorVersion 0 ;
	lv2:extensionData opts:interface ;
	lv2:optionalFeature lv2:hardRTCapable ,
		urid:map ;
	lv2:port [
		a lv2:CVPort ,
			lv2:InputPort ;
		lv2:index 0 ;
		lv2:name "Gate" ;
		lv2:portProperty lv2:toggled ;
		lv2:symbol "gate"
	] , [
		a lv2:CVPort ,
			lv2:InputPort ;
		lv2:index 1 ;
		lv2:name "Trigger" ;
		lv2:portProperty lv2:toggled ,
			<http://lv2plug.in/ns/ext/port-props#trigger> ;
		lv2:symbol "trigger"
	] , [
		a lv2:ControlPort ,
			lv2:InputPort ,
			morph:MorphPort ;
		lv2:default 0 ;
		lv2:index 2 ;
		lv2:minimum 0 ;
		lv2:name "Delay Time" ;
		lv2:symbol "delay" ;
		morph:supportsType lv2:CVPort ;
		units:unit units:s
	] , [
		a lv2:ControlPort ,
			lv2:InputPort ,
			morph:MorphPort ;
		lv2:default 0 ;
		lv2:index 3 ;
		lv2:minimum 0 ;
		lv2:name "Attack Time" ;
		lv2:symbol "attack" ;
		morph:supportsType lv2:CVPort ;
		units:unit units:s
	] , [
		a lv2:ControlPort ,
			lv2:InputPort ,
			morph:MorphPort ;
		lv2:default 0 ;
		lv2:index 4 ;
		lv2:minimum 0 ;
		lv2:name "Hold Time" ;
		lv2:symbol "hold" ;
		morph:supportsType lv2:CVPort ;
		units:unit units:s
	] , [
		a lv2:ControlPort ,
			lv2:InputPort ,
			morph:MorphPort ;
		lv2:default 0 ;
		lv2:index 5 ;
		lv2:minimum 0 ;
		lv2:name "Decay Time" ;
		lv2:symbol "decay" ;
		morph:supportsType lv2:CVPort ;
		units:unit units:s
	] , [
		a lv2:ControlPort ,
			lv2:InputPort ,
			morph:MorphPort ;
		lv2:default 1 ;
		lv2:index 6 ;
		lv2:maximum 1 ;
		lv2:minimum 0 ;
		lv2:name "Sustain Level" ;
		lv2:symbol "sustain" ;
		morph:supportsType lv2:CVPort
	] , [
		a lv2:ControlPort ,
			lv2:InputPort ,
			morph:MorphPort ;
		lv2:default 0 ;
		lv2:index 7 ;
		lv2:minimum 0 ;
		lv2:name "Release Time" ;
		lv2:symbol "release" ;
		morph:supportsType lv2:CVPort ;
		units:unit units:s
	] , [
		a lv2:CVPort ,
			lv2:OutputPort ;
		lv2:index 8 ;
		lv2:name "Envelope Out" ;
		lv2:symbol "out"
	] ;
	dct:replaces <urn:ladspa:2021> ,
		<urn:ladspa:2022> ,
		<urn:ladspa:2038> ;
	doap:name "Retriggerable DAHDSR Envelope" ;
	lv2:documentation """
<p>Generates a DAHDSR (Delay, Attack, Hold, Decay, Sustain, Release)
envelope.</p>

<p>Another envelope generator, this time with two additional stages - Delay,
which delays the onset of the Attack stage, and Hold, which holds the output at
maximum before the Decay stage begins.</p>

<p>Triggering works in subtly different ways to the <a href="#adsr_gnt">ADSR
(1680)</a> - the Trigger will restart the envelope even if the Gate is closed -
the effect of this is to proceed through the stages and begin the release stage
immediately after the decay stage.</p>

<p>The final variant (ID 2038) uses control-rate gate and trigger, which is a
little less CPU hungry, but will cause timing errors that are dependent on the
block size being used by the host.</p>
""" .
