diff options
author | David Robillard <d@drobilla.net> | 2012-05-31 06:04:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-31 06:04:50 +0000 |
commit | d7d39078187917779c5474909b62d2f5421e6788 (patch) | |
tree | dc13d94784660d4752a3cbe9470627c0792abe79 | |
parent | 8b46fd1ff51b29cded517c9c2d166611e8c453fc (diff) | |
parent | 9529f203c09d6dc8f4c2f12c3add9ec906f4bdba (diff) | |
download | blop.lv2-d7d39078187917779c5474909b62d2f5421e6788.tar.gz blop.lv2-d7d39078187917779c5474909b62d2f5421e6788.tar.bz2 blop.lv2-d7d39078187917779c5474909b62d2f5421e6788.zip |
Blip => Blop. I give up trying to give ports new names.
git-svn-id: http://svn.drobilla.net/lad/trunk/plugins/blop.lv2@4485 a436a847-0d15-0410-975c-d299462d15a1
58 files changed, 5558 insertions, 1182 deletions
diff --git a/blip.lv2/adsr.ttl b/blip.lv2/adsr.ttl new file mode 100644 index 0000000..49fcd05 --- /dev/null +++ b/blip.lv2/adsr.ttl @@ -0,0 +1,94 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 units: <http://lv2plug.in/ns/extensions/units#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:adsr + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Driving Signal" ; + lv2:symbol "port0" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Trigger Threshold" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 2 ; + lv2:minimum 0 ; + lv2:name "Attack Time" ; + lv2:symbol "port2" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:minimum 0 ; + lv2:name "Decay Time" ; + lv2:symbol "port3" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 1 ; + lv2:index 4 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Sustain Level" ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 5 ; + lv2:minimum 0 ; + lv2:name "Release Time" ; + lv2:symbol "port5" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Envelope Out" ; + lv2:symbol "port6" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1653> ; + dc:rights "GPL" ; + doap:name "ADSR Envelope" ; + lv2:documentation """ +<p>Generates an ADSR (Attack, Decay, Sustain and Release) envelope.</p> + +<p>Driven by a gate signal - if the level of the signal goes higher than the +Trigger Threshold, the attack stage begins, proceeds to the decay stage and +then holds at the sustain level. The release stage begins when the gate falls +below this theshold - even if the previous stages have not completed.</p> + +<p>The output is a signal between 0.0 (rest) and 1.0 (peak) and the transitions +are linear.</p> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/adsr_gt.ttl b/blip.lv2/adsr_gt.ttl new file mode 100644 index 0000000..8cf025c --- /dev/null +++ b/blip.lv2/adsr_gt.ttl @@ -0,0 +1,100 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 units: <http://lv2plug.in/ns/extensions/units#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:adsr_gt + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Gate" ; + lv2:symbol "port0" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Trigger" ; + lv2:symbol "port1" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 2 ; + lv2:minimum 0 ; + lv2:name "Attack Time" ; + lv2:symbol "port2" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:minimum 0 ; + lv2:name "Decay Time" ; + lv2:symbol "port3" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 1 ; + lv2:index 4 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Sustain Level" ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 5 ; + lv2:minimum 0 ; + lv2:name "Release Time" ; + lv2:symbol "port5" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Envelope Out" ; + lv2:symbol "port6" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1680> ; + dc:rights "GPL" ; + doap:name "ADSR Envelope with Gate and Trigger" ; + lv2:documentation """ +<p>Generates an ADSR (Attack, Decay, Sustain and Release) +envelope.</p> + +<p>Does the same thing as the other ADSR (1658) above, except the +Trigger Threshold is fixed at zero, and the additional Trigger +input allows retriggering whilst the gate is still high.</p> + +<p>The reasoning behind this design is to remove the need for a keyboard player +to release a key before pressing another when using with a monosynth. <a +href="http://www.sospubs.co.uk/sos/nov99/articles/synthsecrets.htm">The +‘Synth Secrets’ article in the November 1999 issue of ‘Sound +on Sound’</a> explains this in detail.</p> + +<p>The output is a signal between 0.0 (rest) and 1.0 (peak) and the +transitions are linear.</p> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/amp.ttl b/blip.lv2/amp.ttl new file mode 100644 index 0000000..7355a16 --- /dev/null +++ b/blip.lv2/amp.ttl @@ -0,0 +1,50 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 units: <http://lv2plug.in/ns/extensions/units#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:amp + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:maximum 96 ; + lv2:minimum -96 ; + lv2:name "Gain" ; + lv2:symbol "port0" ; + units:unit units:db ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Input" ; + lv2:symbol "port1" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Output" ; + lv2:symbol "port2" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1654> , + <urn:ladspa:1655> ; + dc:rights "GPL" ; + doap:name "Amplifier" ; + lv2:documentation """ +<p>A simple monophonic amplifier.</p> +""" ; + a lv2:Plugin , lv2:AmplifierPlugin . diff --git a/blip.lv2/branch.ttl b/blip.lv2/branch.ttl new file mode 100644 index 0000000..dfc9a1b --- /dev/null +++ b/blip.lv2/branch.ttl @@ -0,0 +1,48 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:branch + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Input" ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "First Output" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Second Output" ; + lv2:symbol "port2" ; + a lv2:ControlPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1673> , + <urn:ladspa:1674> ; + dc:rights "GPL" ; + doap:name "Signal Branch" ; + lv2:documentation """ +<p>Splits an input signal into two identical signals. Somewhat redundant, as +most modular synth hosts allow you to connect an output to more than one input. +If your host of choice does not allow this, this plugin will do the job...</p> +""" ; + a lv2:Plugin , lv2:UtilityPlugin . diff --git a/blip.lv2/dahdsr.ttl b/blip.lv2/dahdsr.ttl new file mode 100644 index 0000000..0f05cfb --- /dev/null +++ b/blip.lv2/dahdsr.ttl @@ -0,0 +1,122 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 units: <http://lv2plug.in/ns/extensions/units#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:dahdsr + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Gate" ; + lv2:symbol "port0" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Trigger" ; + lv2:symbol "port1" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 2 ; + lv2:minimum 0 ; + lv2:name "Delay Time" ; + lv2:symbol "port2" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:minimum 0 ; + lv2:name "Attack Time" ; + lv2:symbol "port3" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 4 ; + lv2:minimum 0 ; + lv2:name "Hold Time" ; + lv2:symbol "port4" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 5 ; + lv2:minimum 0 ; + lv2:name "Decay Time" ; + lv2:symbol "port5" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 1 ; + lv2:index 6 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Sustain Level" ; + lv2:symbol "port6" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 7 ; + lv2:minimum 0 ; + lv2:name "Release Time" ; + lv2:symbol "port7" ; + units:unit units:s ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 8 ; + lv2:name "Envelope Out" ; + lv2:symbol "port8" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:2021> , + <urn:ladspa:2022> , + <urn:ladspa:2038> ; + dc:rights "GPL" ; + doap:name "DAHDSR Envelope with Gate and Trigger" ; + 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> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/difference.ttl b/blip.lv2/difference.ttl new file mode 100644 index 0000000..f277688 --- /dev/null +++ b/blip.lv2/difference.ttl @@ -0,0 +1,48 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:difference + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Minuend" ; + lv2:symbol "minuend" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Subtrahend" ; + lv2:symbol "subtrahend" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Difference" ; + lv2:symbol "difference" ; + a lv2:CVPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:2030> , + <urn:ladspa:2031> , + <urn:ladspa:2032> , + <urn:ladspa:2033> ; + dc:rights "GPL" ; + doap:name "Signal Difference" ; + lv2:documentation """ +<p>Subtract two signals.</p> +""" ; + a lv2:Plugin , lv2:UtilityPlugin . diff --git a/blip.lv2/fmod.ttl b/blip.lv2/fmod.ttl new file mode 100644 index 0000000..3d59713 --- /dev/null +++ b/blip.lv2/fmod.ttl @@ -0,0 +1,57 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 units: <http://lv2plug.in/ns/extensions/units#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:fmod + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:maximum 0.5 ; + lv2:minimum "2.08333e-05"^^xsd:double ; + lv2:name "Frequency" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port0" ; + units:unit units:hz ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Modulation" ; + lv2:symbol "port1" ; + units:unit units:oct ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Modulated Frequency" ; + lv2:symbol "port2" ; + units:unit units:hz ; + a lv2:ControlPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1656> , + <urn:ladspa:1657> , + <urn:ladspa:1658> , + <urn:ladspa:1659> ; + dc:rights "GPL" ; + doap:name "Frequency Modulator" ; + lv2:documentation """ +<p>Modulates an input frequency by a driving signal, transposing the frequency +by ±1 Octave per unit amplitude of signal.</p> +""" ; + a lv2:Plugin , lv2:SpectralPlugin . diff --git a/blip.lv2/interpolator.ttl b/blip.lv2/interpolator.ttl new file mode 100644 index 0000000..6ea32a7 --- /dev/null +++ b/blip.lv2/interpolator.ttl @@ -0,0 +1,39 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:interpolator + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Control Input" ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Interpolated Output" ; + lv2:symbol "port1" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1660> ; + dc:rights "GPL" ; + doap:name "Control to Audio Interpolator" ; + lv2:documentation """ +<p>Interpolates a control-rate (per-block) signal into a smooth audio +(per-sample) signal.</p> +""" ; + a lv2:Plugin , lv2:UtilityPlugin . diff --git a/blip.lv2/lp4pole.ttl b/blip.lv2/lp4pole.ttl new file mode 100644 index 0000000..f12e9bd --- /dev/null +++ b/blip.lv2/lp4pole.ttl @@ -0,0 +1,64 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:lp4pole + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:default 0.5 ; + lv2:index 0 ; + lv2:maximum 0.5 ; + lv2:minimum "2.08333e-05"^^xsd:double ; + lv2:name "Cutoff Frequency" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 1 ; + lv2:maximum 4 ; + lv2:minimum 0 ; + lv2:name "Resonance" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Input" ; + lv2:symbol "port2" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 3 ; + lv2:name "Output" ; + lv2:symbol "port3" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1671> , + <urn:ladspa:1672> ; + dc:rights "GPL" ; + doap:name "4 Pole Resonant Low-Pass Filter" ; + lv2:documentation """ +<p>Emulates a low pass filter in popular analogue synthesisers. This particular +filter is derived from one of <a +href="http://www.musicdsp.org/archive.php?classid=3#24">many +implementations</a> of the Moog 4 pole filter.</p> +""" ; + a lv2:Plugin , lv2:LowpassPlugin . diff --git a/blip.lv2/manifest.ttl.in b/blip.lv2/manifest.ttl.in new file mode 100644 index 0000000..e1ceab7 --- /dev/null +++ b/blip.lv2/manifest.ttl.in @@ -0,0 +1,138 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:adsr + a lv2:Plugin ; + rdfs:seeAlso <adsr.ttl> ; + lv2:binary <adsr@LIB_EXT@> . + +blip:adsr_gt + a lv2:Plugin ; + rdfs:seeAlso <adsr_gt.ttl> ; + lv2:binary <adsr_gt@LIB_EXT@> . + +blip:amp + a lv2:Plugin ; + rdfs:seeAlso <amp.ttl> ; + lv2:binary <amp@LIB_EXT@> . + +blip:branch + a lv2:Plugin ; + rdfs:seeAlso <branch.ttl> ; + lv2:binary <branch@LIB_EXT@> . + +blip:dahdsr + a lv2:Plugin ; + rdfs:seeAlso <dahdsr.ttl> ; + lv2:binary <dahdsr@LIB_EXT@> . + +blip:difference + a lv2:Plugin ; + rdfs:seeAlso <difference.ttl> ; + lv2:binary <difference@LIB_EXT@> . + +blip:fmod + a lv2:Plugin ; + rdfs:seeAlso <fmod.ttl> ; + lv2:binary <fmod@LIB_EXT@> . + +blip:interpolator + a lv2:Plugin ; + rdfs:seeAlso <interpolator.ttl> ; + lv2:binary <interpolator@LIB_EXT@> . + +blip:lp4pole + a lv2:Plugin ; + rdfs:seeAlso <lp4pole.ttl> ; + lv2:binary <lp4pole@LIB_EXT@> . + +blip:product + a lv2:Plugin ; + rdfs:seeAlso <product.ttl> ; + lv2:binary <product@LIB_EXT@> . + +blip:pulse + a lv2:Plugin ; + rdfs:seeAlso <pulse.ttl> ; + lv2:binary <pulse@LIB_EXT@> . + +blip:quantiser_20 + a lv2:Plugin ; + rdfs:seeAlso <quantiser_20.ttl> ; + lv2:binary <quantiser_20@LIB_EXT@> . + +blip:quantiser_50 + a lv2:Plugin ; + rdfs:seeAlso <quantiser_50.ttl> ; + lv2:binary <quantiser_50@LIB_EXT@> . + +blip:quantiser_100 + a lv2:Plugin ; + rdfs:seeAlso <quantiser_100.ttl> ; + lv2:binary <quantiser_100@LIB_EXT@> . + +blip:random + a lv2:Plugin ; + rdfs:seeAlso <random.ttl> ; + lv2:binary <random@LIB_EXT@> . + +blip:ratio + a lv2:Plugin ; + rdfs:seeAlso <ratio.ttl> ; + lv2:binary <ratio@LIB_EXT@> . + +blip:sawtooth + a lv2:Plugin ; + rdfs:seeAlso <sawtooth.ttl> ; + lv2:binary <sawtooth@LIB_EXT@> . + +blip:sequencer_16 + a lv2:Plugin ; + rdfs:seeAlso <sequencer_16.ttl> ; + lv2:binary <sequencer_16@LIB_EXT@> . + +blip:sequencer_32 + a lv2:Plugin ; + rdfs:seeAlso <sequencer_32.ttl> ; + lv2:binary <sequencer_32@LIB_EXT@> . + +blip:sequencer_64 + a lv2:Plugin ; + rdfs:seeAlso <sequencer_64.ttl> ; + lv2:binary <sequencer_64@LIB_EXT@> . + +blip:square + a lv2:Plugin ; + rdfs:seeAlso <square.ttl> ; + lv2:binary <square@LIB_EXT@> . + +blip:sum + a lv2:Plugin ; + rdfs:seeAlso <sum.ttl> ; + lv2:binary <sum@LIB_EXT@> . + +blip:sync_pulse + a lv2:Plugin ; + rdfs:seeAlso <sync_pulse.ttl> ; + lv2:binary <sync_pulse@LIB_EXT@> . + +blip:sync_square + a lv2:Plugin ; + rdfs:seeAlso <sync_square.ttl> ; + lv2:binary <sync_square@LIB_EXT@> . + +blip:tracker + a lv2:Plugin ; + rdfs:seeAlso <tracker.ttl> ; + lv2:binary <tracker@LIB_EXT@> . + +blip:triangle + a lv2:Plugin ; + rdfs:seeAlso <triangle.ttl> ; + lv2:binary <triangle@LIB_EXT@> . diff --git a/blip.lv2/product.ttl b/blip.lv2/product.ttl new file mode 100644 index 0000000..efe1eab --- /dev/null +++ b/blip.lv2/product.ttl @@ -0,0 +1,47 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:product + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Multiplicand" ; + lv2:symbol "multiplicand" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Multiplier" ; + lv2:symbol "multiplier" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Product" ; + lv2:symbol "product" ; + a lv2:CVPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1668> , + <urn:ladspa:1669> , + <urn:ladspa:1670> ; + dc:rights "GPL" ; + doap:name "Signal Product" ; + lv2:documentation """ +<p>Multiply two signals.</p> +""" ; + a lv2:Plugin , lv2:UtilityPlugin . diff --git a/blip.lv2/pulse.ttl b/blip.lv2/pulse.ttl new file mode 100644 index 0000000..9eb3af1 --- /dev/null +++ b/blip.lv2/pulse.ttl @@ -0,0 +1,57 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:pulse + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:maximum 0.5 ; + lv2:minimum 0.000001 ; + lv2:default 440.0 ; + lv2:name "Frequency" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0.5 ; + lv2:index 1 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Pulse Width" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Output" ; + lv2:symbol "port2" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1645> , + <urn:ladspa:1646> , + <urn:ladspa:1647> , + <urn:ladspa:1648> ; + dc:rights "GPL" ; + doap:name "Variable Width Pulse Oscillator" ; + lv2:documentation """ +<p>Generates an alias-free pulse wave at given input frequency and pulse width +(duty).</p> +""" ; + a lv2:Plugin , lv2:OscillatorPlugin . diff --git a/blip.lv2/quantiser_100.ttl b/blip.lv2/quantiser_100.ttl new file mode 100644 index 0000000..b44d21d --- /dev/null +++ b/blip.lv2/quantiser_100.ttl @@ -0,0 +1,820 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:quantiser_100 + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Quantise Range Minimum" ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Quantise Range Maximum" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 10 ; + lv2:name "Value 5" ; + lv2:symbol "port10" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 100 ; + lv2:name "Value 95" ; + lv2:symbol "port100" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 101 ; + lv2:name "Value 96" ; + lv2:symbol "port101" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 102 ; + lv2:name "Value 97" ; + lv2:symbol "port102" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 103 ; + lv2:name "Value 98" ; + lv2:symbol "port103" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 104 ; + lv2:name "Value 99" ; + lv2:symbol "port104" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 105 ; + lv2:name "Input" ; + lv2:symbol "port105" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 106 ; + lv2:name "Quantised Output" ; + lv2:symbol "port106" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:index 107 ; + lv2:name "Output Changed" ; + lv2:symbol "port107" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:index 11 ; + lv2:name "Value 6" ; + lv2:symbol "port11" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 12 ; + lv2:name "Value 7" ; + lv2:symbol "port12" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 13 ; + lv2:name "Value 8" ; + lv2:symbol "port13" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 14 ; + lv2:name "Value 9" ; + lv2:symbol "port14" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 15 ; + lv2:name "Value 10" ; + lv2:symbol "port15" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 16 ; + lv2:name "Value 11" ; + lv2:symbol "port16" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 17 ; + lv2:name "Value 12" ; + lv2:symbol "port17" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 18 ; + lv2:name "Value 13" ; + lv2:symbol "port18" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 19 ; + lv2:name "Value 14" ; + lv2:symbol "port19" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 2 ; + lv2:minimum 0 ; + lv2:name "Match Range" ; + lv2:symbol "port2" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 20 ; + lv2:name "Value 15" ; + lv2:symbol "port20" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 21 ; + lv2:name "Value 16" ; + lv2:symbol "port21" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 22 ; + lv2:name "Value 17" ; + lv2:symbol "port22" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 23 ; + lv2:name "Value 18" ; + lv2:symbol "port23" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 24 ; + lv2:name "Value 19" ; + lv2:symbol "port24" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 25 ; + lv2:name "Value 20" ; + lv2:symbol "port25" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 26 ; + lv2:name "Value 21" ; + lv2:symbol "port26" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 27 ; + lv2:name "Value 22" ; + lv2:symbol "port27" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 28 ; + lv2:name "Value 23" ; + lv2:symbol "port28" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 29 ; + lv2:name "Value 24" ; + lv2:symbol "port29" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:maximum 2 ; + lv2:minimum 0 ; + lv2:name "Mode (0 = Extend, 1 = Wrap, 2 = Clip)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port3" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 30 ; + lv2:name "Value 25" ; + lv2:symbol "port30" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 31 ; + lv2:name "Value 26" ; + lv2:symbol "port31" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 32 ; + lv2:name "Value 27" ; + lv2:symbol "port32" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 33 ; + lv2:name "Value 28" ; + lv2:symbol "port33" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 34 ; + lv2:name "Value 29" ; + lv2:symbol "port34" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 35 ; + lv2:name "Value 30" ; + lv2:symbol "port35" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 36 ; + lv2:name "Value 31" ; + lv2:symbol "port36" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 37 ; + lv2:name "Value 32" ; + lv2:symbol "port37" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 38 ; + lv2:name "Value 33" ; + lv2:symbol "port38" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 39 ; + lv2:name "Value 34" ; + lv2:symbol "port39" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 100 ; + lv2:index 4 ; + lv2:maximum 100 ; + lv2:minimum 1 ; + lv2:name "Steps (1 - 100)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 40 ; + lv2:name "Value 35" ; + lv2:symbol "port40" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 41 ; + lv2:name "Value 36" ; + lv2:symbol "port41" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 42 ; + lv2:name "Value 37" ; + lv2:symbol "port42" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 43 ; + lv2:name "Value 38" ; + lv2:symbol "port43" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 44 ; + lv2:name "Value 39" ; + lv2:symbol "port44" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 45 ; + lv2:name "Value 40" ; + lv2:symbol "port45" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 46 ; + lv2:name "Value 41" ; + lv2:symbol "port46" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 47 ; + lv2:name "Value 42" ; + lv2:symbol "port47" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 48 ; + lv2:name "Value 43" ; + lv2:symbol "port48" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 49 ; + lv2:name "Value 44" ; + lv2:symbol "port49" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 5 ; + lv2:name "Value 0" ; + lv2:symbol "port5" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 50 ; + lv2:name "Value 45" ; + lv2:symbol "port50" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 51 ; + lv2:name "Value 46" ; + lv2:symbol "port51" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 52 ; + lv2:name "Value 47" ; + lv2:symbol "port52" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 53 ; + lv2:name "Value 48" ; + lv2:symbol "port53" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 54 ; + lv2:name "Value 49" ; + lv2:symbol "port54" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 55 ; + lv2:name "Value 50" ; + lv2:symbol "port55" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 56 ; + lv2:name "Value 51" ; + lv2:symbol "port56" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 57 ; + lv2:name "Value 52" ; + lv2:symbol "port57" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 58 ; + lv2:name "Value 53" ; + lv2:symbol "port58" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 59 ; + lv2:name "Value 54" ; + lv2:symbol "port59" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Value 1" ; + lv2:symbol "port6" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 60 ; + lv2:name "Value 55" ; + lv2:symbol "port60" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 61 ; + lv2:name "Value 56" ; + lv2:symbol "port61" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 62 ; + lv2:name "Value 57" ; + lv2:symbol "port62" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 63 ; + lv2:name "Value 58" ; + lv2:symbol "port63" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 64 ; + lv2:name "Value 59" ; + lv2:symbol "port64" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 65 ; + lv2:name "Value 60" ; + lv2:symbol "port65" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 66 ; + lv2:name "Value 61" ; + lv2:symbol "port66" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 67 ; + lv2:name "Value 62" ; + lv2:symbol "port67" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 68 ; + lv2:name "Value 63" ; + lv2:symbol "port68" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 69 ; + lv2:name "Value 64" ; + lv2:symbol "port69" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 7 ; + lv2:name "Value 2" ; + lv2:symbol "port7" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 70 ; + lv2:name "Value 65" ; + lv2:symbol "port70" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 71 ; + lv2:name "Value 66" ; + lv2:symbol "port71" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 72 ; + lv2:name "Value 67" ; + lv2:symbol "port72" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 73 ; + lv2:name "Value 68" ; + lv2:symbol "port73" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 74 ; + lv2:name "Value 69" ; + lv2:symbol "port74" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 75 ; + lv2:name "Value 70" ; + lv2:symbol "port75" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 76 ; + lv2:name "Value 71" ; + lv2:symbol "port76" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 77 ; + lv2:name "Value 72" ; + lv2:symbol "port77" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 78 ; + lv2:name "Value 73" ; + lv2:symbol "port78" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 79 ; + lv2:name "Value 74" ; + lv2:symbol "port79" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 8 ; + lv2:name "Value 3" ; + lv2:symbol "port8" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 80 ; + lv2:name "Value 75" ; + lv2:symbol "port80" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 81 ; + lv2:name "Value 76" ; + lv2:symbol "port81" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 82 ; + lv2:name "Value 77" ; + lv2:symbol "port82" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 83 ; + lv2:name "Value 78" ; + lv2:symbol "port83" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 84 ; + lv2:name "Value 79" ; + lv2:symbol "port84" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 85 ; + lv2:name "Value 80" ; + lv2:symbol "port85" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 86 ; + lv2:name "Value 81" ; + lv2:symbol "port86" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 87 ; + lv2:name "Value 82" ; + lv2:symbol "port87" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 88 ; + lv2:name "Value 83" ; + lv2:symbol "port88" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 89 ; + lv2:name "Value 84" ; + lv2:symbol "port89" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 9 ; + lv2:name "Value 4" ; + lv2:symbol "port9" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 90 ; + lv2:name "Value 85" ; + lv2:symbol "port90" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 91 ; + lv2:name "Value 86" ; + lv2:symbol "port91" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 92 ; + lv2:name "Value 87" ; + lv2:symbol "port92" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 93 ; + lv2:name "Value 88" ; + lv2:symbol "port93" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 94 ; + lv2:name "Value 89" ; + lv2:symbol "port94" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 95 ; + lv2:name "Value 90" ; + lv2:symbol "port95" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 96 ; + lv2:name "Value 91" ; + lv2:symbol "port96" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 97 ; + lv2:name "Value 92" ; + lv2:symbol "port97" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 98 ; + lv2:name "Value 93" ; + lv2:symbol "port98" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 99 ; + lv2:name "Value 94" ; + lv2:symbol "port99" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:2029> ; + dc:rights "GPL" ; + doap:name "Quantiser (100 Steps)" ; + lv2:documentation """ +<p>Quantises a signal to a set of arbitrary values within a range.</p> + +<p>Match Range determines the distance from the quantised value that the input +can deviate before being altered. This allows small variations in input to get +through unmolested. If it is set to 0 the input is quantised to the nearest +exact match.</p> + +<p>Mode is one of Extend (0), Wrap (1) or Clip (2).</p> + +<p>Steps is the number of quantisation steps to use (up to a maximum of +100).</p> + +<p>For example, given the following settings:</p> +<ul> + <li>Range Minimum = 0.0</li> + <li>Range Maximum = 12.0</li> + <li>Match Range = 0.0</li> + <li>Steps = 4</li> + <li>Quantisation Values 3, 5, 7 and 10</li> +</ul> + +<p>and an input that is a line from -24 to 24, the output will be:</p> +<ul> + <li>Extend: -26, -21, -19, -17, -14, -9, -7, -5, -2, 3, 5, 7, 10, 15, 17, 19, + 22</li> + <li>Wrap: 10, 3, 5, 7, 10, 3, 5, 7, 10, 3, 5, 7, 10, 3, 5, 7, 10</li> + <li>Clip: 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 10, 10, 10, 10, 10</li> +</ul> + +<p>The quantisation values should all be within the range minimum and maximum +for it to work!</p> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/quantiser_20.ttl b/blip.lv2/quantiser_20.ttl new file mode 100644 index 0000000..893c346 --- /dev/null +++ b/blip.lv2/quantiser_20.ttl @@ -0,0 +1,260 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:quantiser_20 + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Quantise Range Minimum" ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Quantise Range Maximum" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 10 ; + lv2:name "Value 5" ; + lv2:symbol "port10" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 11 ; + lv2:name "Value 6" ; + lv2:symbol "port11" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 12 ; + lv2:name "Value 7" ; + lv2:symbol "port12" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 13 ; + lv2:name "Value 8" ; + lv2:symbol "port13" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 14 ; + lv2:name "Value 9" ; + lv2:symbol "port14" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 15 ; + lv2:name "Value 10" ; + lv2:symbol "port15" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 16 ; + lv2:name "Value 11" ; + lv2:symbol "port16" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 17 ; + lv2:name "Value 12" ; + lv2:symbol "port17" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 18 ; + lv2:name "Value 13" ; + lv2:symbol "port18" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 19 ; + lv2:name "Value 14" ; + lv2:symbol "port19" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 2 ; + lv2:minimum 0 ; + lv2:name "Match Range" ; + lv2:symbol "port2" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 20 ; + lv2:name "Value 15" ; + lv2:symbol "port20" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 21 ; + lv2:name "Value 16" ; + lv2:symbol "port21" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 22 ; + lv2:name "Value 17" ; + lv2:symbol "port22" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 23 ; + lv2:name "Value 18" ; + lv2:symbol "port23" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 24 ; + lv2:name "Value 19" ; + lv2:symbol "port24" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 25 ; + lv2:name "Input" ; + lv2:symbol "port25" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 26 ; + lv2:name "Quantised Output" ; + lv2:symbol "port26" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:index 27 ; + lv2:name "Output Changed" ; + lv2:symbol "port27" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:maximum 2 ; + lv2:minimum 0 ; + lv2:name "Mode (0 = Extend, 1 = Wrap, 2 = Clip)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port3" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 20 ; + lv2:index 4 ; + lv2:maximum 20 ; + lv2:minimum 1 ; + lv2:name "Steps (1 - 20)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 5 ; + lv2:name "Value 0" ; + lv2:symbol "port5" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Value 1" ; + lv2:symbol "port6" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 7 ; + lv2:name "Value 2" ; + lv2:symbol "port7" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 8 ; + lv2:name "Value 3" ; + lv2:symbol "port8" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 9 ; + lv2:name "Value 4" ; + lv2:symbol "port9" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:2027> ; + dc:rights "GPL" ; + doap:name "Quantiser (20 Steps)" ; + lv2:documentation """ +<p>Quantises a signal to a set of arbitrary values within a range.</p> + +<p>Match Range determines the distance from the quantised value that the input +can deviate before being altered. This allows small variations in input to get +through unmolested. If it is set to 0 the input is quantised to the nearest +exact match.</p> + +<p>Mode is one of Extend (0), Wrap (1) or Clip (2).</p> + +<p>Steps is the number of quantisation steps to use (up to a maximum of +20).</p> + +<p>For example, given the following settings:</p> +<ul> + <li>Range Minimum = 0.0</li> + <li>Range Maximum = 12.0</li> + <li>Match Range = 0.0</li> + <li>Steps = 4</li> + <li>Quantisation Values 3, 5, 7 and 10</li> +</ul> + +<p>and an input that is a line from -24 to 24, the output will be:</p> +<ul> + <li>Extend: -26, -21, -19, -17, -14, -9, -7, -5, -2, 3, 5, 7, 10, 15, 17, 19, + 22</li> + <li>Wrap: 10, 3, 5, 7, 10, 3, 5, 7, 10, 3, 5, 7, 10, 3, 5, 7, 10</li> + <li>Clip: 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 10, 10, 10, 10, 10</li> +</ul> + +<p>The quantisation values should all be within the range minimum and maximum +for it to work!</p> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/quantiser_50.ttl b/blip.lv2/quantiser_50.ttl new file mode 100644 index 0000000..9481cd2 --- /dev/null +++ b/blip.lv2/quantiser_50.ttl @@ -0,0 +1,470 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:quantiser_50 + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Quantise Range Minimum" ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Quantise Range Maximum" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 10 ; + lv2:name "Value 5" ; + lv2:symbol "port10" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 11 ; + lv2:name "Value 6" ; + lv2:symbol "port11" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 12 ; + lv2:name "Value 7" ; + lv2:symbol "port12" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 13 ; + lv2:name "Value 8" ; + lv2:symbol "port13" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 14 ; + lv2:name "Value 9" ; + lv2:symbol "port14" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 15 ; + lv2:name "Value 10" ; + lv2:symbol "port15" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 16 ; + lv2:name "Value 11" ; + lv2:symbol "port16" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 17 ; + lv2:name "Value 12" ; + lv2:symbol "port17" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 18 ; + lv2:name "Value 13" ; + lv2:symbol "port18" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 19 ; + lv2:name "Value 14" ; + lv2:symbol "port19" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 2 ; + lv2:minimum 0 ; + lv2:name "Match Range" ; + lv2:symbol "port2" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 20 ; + lv2:name "Value 15" ; + lv2:symbol "port20" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 21 ; + lv2:name "Value 16" ; + lv2:symbol "port21" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 22 ; + lv2:name "Value 17" ; + lv2:symbol "port22" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 23 ; + lv2:name "Value 18" ; + lv2:symbol "port23" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 24 ; + lv2:name "Value 19" ; + lv2:symbol "port24" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 25 ; + lv2:name "Value 20" ; + lv2:symbol "port25" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 26 ; + lv2:name "Value 21" ; + lv2:symbol "port26" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 27 ; + lv2:name "Value 22" ; + lv2:symbol "port27" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 28 ; + lv2:name "Value 23" ; + lv2:symbol "port28" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 29 ; + lv2:name "Value 24" ; + lv2:symbol "port29" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:maximum 2 ; + lv2:minimum 0 ; + lv2:name "Mode (0 = Extend, 1 = Wrap, 2 = Clip)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port3" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 30 ; + lv2:name "Value 25" ; + lv2:symbol "port30" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 31 ; + lv2:name "Value 26" ; + lv2:symbol "port31" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 32 ; + lv2:name "Value 27" ; + lv2:symbol "port32" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 33 ; + lv2:name "Value 28" ; + lv2:symbol "port33" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 34 ; + lv2:name "Value 29" ; + lv2:symbol "port34" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 35 ; + lv2:name "Value 30" ; + lv2:symbol "port35" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 36 ; + lv2:name "Value 31" ; + lv2:symbol "port36" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 37 ; + lv2:name "Value 32" ; + lv2:symbol "port37" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 38 ; + lv2:name "Value 33" ; + lv2:symbol "port38" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 39 ; + lv2:name "Value 34" ; + lv2:symbol "port39" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 50 ; + lv2:index 4 ; + lv2:maximum 50 ; + lv2:minimum 1 ; + lv2:name "Steps (1 - 50)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 40 ; + lv2:name "Value 35" ; + lv2:symbol "port40" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 41 ; + lv2:name "Value 36" ; + lv2:symbol "port41" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 42 ; + lv2:name "Value 37" ; + lv2:symbol "port42" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 43 ; + lv2:name "Value 38" ; + lv2:symbol "port43" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 44 ; + lv2:name "Value 39" ; + lv2:symbol "port44" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 45 ; + lv2:name "Value 40" ; + lv2:symbol "port45" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 46 ; + lv2:name "Value 41" ; + lv2:symbol "port46" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 47 ; + lv2:name "Value 42" ; + lv2:symbol "port47" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 48 ; + lv2:name "Value 43" ; + lv2:symbol "port48" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 49 ; + lv2:name "Value 44" ; + lv2:symbol "port49" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 5 ; + lv2:name "Value 0" ; + lv2:symbol "port5" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 50 ; + lv2:name "Value 45" ; + lv2:symbol "port50" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 51 ; + lv2:name "Value 46" ; + lv2:symbol "port51" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 52 ; + lv2:name "Value 47" ; + lv2:symbol "port52" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 53 ; + lv2:name "Value 48" ; + lv2:symbol "port53" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 54 ; + lv2:name "Value 49" ; + lv2:symbol "port54" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 55 ; + lv2:name "Input" ; + lv2:symbol "port55" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 56 ; + lv2:name "Quantised Output" ; + lv2:symbol "port56" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:index 57 ; + lv2:name "Output Changed" ; + lv2:symbol "port57" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Value 1" ; + lv2:symbol "port6" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 7 ; + lv2:name "Value 2" ; + lv2:symbol "port7" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 8 ; + lv2:name "Value 3" ; + lv2:symbol "port8" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 9 ; + lv2:name "Value 4" ; + lv2:symbol "port9" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:2028> ; + dc:rights "GPL" ; + doap:name "Quantiser (50 Steps)" ; + lv2:documentation """ +<p>Quantises a signal to a set of arbitrary values within a range.</p> + +<p>Match Range determines the distance from the quantised value that the input +can deviate before being altered. This allows small variations in input to get +through unmolested. If it is set to 0 the input is quantised to the nearest +exact match.</p> + +<p>Mode is one of Extend (0), Wrap (1) or Clip (2).</p> + +<p>Steps is the number of quantisation steps to use (up to a maximum of +50).</p> + +<p>For example, given the following settings:</p> +<ul> + <li>Range Minimum = 0.0</li> + <li>Range Maximum = 12.0</li> + <li>Match Range = 0.0</li> + <li>Steps = 4</li> + <li>Quantisation Values 3, 5, 7 and 10</li> +</ul> + +<p>and an input that is a line from -24 to 24, the output will be:</p> +<ul> + <li>Extend: -26, -21, -19, -17, -14, -9, -7, -5, -2, 3, 5, 7, 10, 15, 17, 19, + 22</li> + <li>Wrap: 10, 3, 5, 7, 10, 3, 5, 7, 10, 3, 5, 7, 10, 3, 5, 7, 10</li> + <li>Clip: 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7, 10, 10, 10, 10, 10</li> +</ul> + +<p>The quantisation values should all be within the range minimum and maximum +for it to work!</p> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/random.ttl b/blip.lv2/random.ttl new file mode 100644 index 0000000..abdc38e --- /dev/null +++ b/blip.lv2/random.ttl @@ -0,0 +1,62 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 units: <http://lv2plug.in/ns/extensions/units#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:random + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:maximum 0.5 ; + lv2:minimum 0.000001 ; + lv2:default 440.0 ; + lv2:name "Frequency" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port0" ; + units:unit units:hz ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 1 ; + lv2:index 1 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Wave Smoothness" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Output" ; + lv2:symbol "port2" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1661> , + <urn:ladspa:1662> , + <urn:ladspa:1663> , + <urn:ladspa:1664> ; + dc:rights "GPL" ; + doap:name "Random Wave Generator" ; + lv2:documentation """ +<p>Generates a random waveform of varying frequency and smoothness. The +frequency determines how often the output changes. The smoothness, how quickly +a transition occurs.</p> + +<p>The output varies between ±1, with an even distribution.</p> +""" ; + a lv2:Plugin , lv2:OscillatorPlugin . diff --git a/blip.lv2/ratio.ttl b/blip.lv2/ratio.ttl new file mode 100644 index 0000000..cefb069 --- /dev/null +++ b/blip.lv2/ratio.ttl @@ -0,0 +1,49 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:ratio + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Numerator" ; + lv2:symbol "numerator" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Denominator" ; + lv2:symbol "denominator" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Ratio" ; + lv2:symbol "ratio" ; + a lv2:CVPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:2034> , + <urn:ladspa:2035> , + <urn:ladspa:2036> , + <urn:ladspa:2037> ; + dc:rights "GPL" ; + doap:name "Signal Ratio" ; + lv2:documentation """ +<p>Get the ratio between two signals.</p> +<p>To avoid divisions by zero, 0 is treated as a really small number.</p> +""" ; + a lv2:Plugin , lv2:UtilityPlugin . diff --git a/blip.lv2/sawtooth.ttl b/blip.lv2/sawtooth.ttl new file mode 100644 index 0000000..0d928f3 --- /dev/null +++ b/blip.lv2/sawtooth.ttl @@ -0,0 +1,44 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:sawtooth + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:maximum 0.5 ; + lv2:minimum 0.000001 ; + lv2:default 440.0 ; + lv2:name "Frequency" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Output" ; + lv2:symbol "port1" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1642> , + <urn:ladspa:1643> ; + dc:rights "GPL" ; + doap:name "Sawtooth Oscillator" ; + lv2:documentation """ +<p>Generates an alias-free sawtooth wave at given input frequency.</p> +""" ; + a lv2:Plugin , lv2:OscillatorPlugin . diff --git a/blip.lv2/sequencer_16.ttl b/blip.lv2/sequencer_16.ttl new file mode 100644 index 0000000..6f08ab2 --- /dev/null +++ b/blip.lv2/sequencer_16.ttl @@ -0,0 +1,192 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:sequencer_16 + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Gate (Open > 0)" ; + lv2:symbol "port0" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Step Trigger" ; + lv2:symbol "port1" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 10 ; + lv2:name "Value Step 5" ; + lv2:symbol "port10" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 11 ; + lv2:name "Value Step 6" ; + lv2:symbol "port11" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 12 ; + lv2:name "Value Step 7" ; + lv2:symbol "port12" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 13 ; + lv2:name "Value Step 8" ; + lv2:symbol "port13" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 14 ; + lv2:name "Value Step 9" ; + lv2:symbol "port14" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 15 ; + lv2:name "Value Step 10" ; + lv2:symbol "port15" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 16 ; + lv2:name "Value Step 11" ; + lv2:symbol "port16" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 17 ; + lv2:name "Value Step 12" ; + lv2:symbol "port17" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 18 ; + lv2:name "Value Step 13" ; + lv2:symbol "port18" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 19 ; + lv2:name "Value Step 14" ; + lv2:symbol "port19" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 16 ; + lv2:index 2 ; + lv2:maximum 16 ; + lv2:minimum 1 ; + lv2:name "Loop Steps (1 - 16)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port2" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 20 ; + lv2:name "Value Step 15" ; + lv2:symbol "port20" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 21 ; + lv2:name "Value Out" ; + lv2:symbol "port21" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Reset to Value on Gate Close?" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port3" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 4 ; + lv2:name "Closed Gate Value" ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 5 ; + lv2:name "Value Step 0" ; + lv2:symbol "port5" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Value Step 1" ; + lv2:symbol "port6" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 7 ; + lv2:name "Value Step 2" ; + lv2:symbol "port7" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 8 ; + lv2:name "Value Step 3" ; + lv2:symbol "port8" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 9 ; + lv2:name "Value Step 4" ; + lv2:symbol "port9" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1677> ; + dc:rights "GPL" ; + doap:name "Analogue Style 16 Step Sequencer" ; + lv2:documentation """ +<p>Simulates an analogue step sequencer. The sequencer stores a number of +values which are stepped through using a trigger when the gate is open, looping +after a given number of steps. This variant has 16 steps.</p> + +<p>When the gate is closed, the sequencer returns to the start. Output when +the gate is closed can be set to a default value. If not, it will just output +the last value reached before the gate was closed.</p> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/sequencer_32.ttl b/blip.lv2/sequencer_32.ttl new file mode 100644 index 0000000..6797b36 --- /dev/null +++ b/blip.lv2/sequencer_32.ttl @@ -0,0 +1,304 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:sequencer_32 + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Gate (Open > 0)" ; + lv2:symbol "port0" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Step Trigger" ; + lv2:symbol "port1" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 10 ; + lv2:name "Value Step 5" ; + lv2:symbol "port10" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 11 ; + lv2:name "Value Step 6" ; + lv2:symbol "port11" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 12 ; + lv2:name "Value Step 7" ; + lv2:symbol "port12" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 13 ; + lv2:name "Value Step 8" ; + lv2:symbol "port13" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 14 ; + lv2:name "Value Step 9" ; + lv2:symbol "port14" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 15 ; + lv2:name "Value Step 10" ; + lv2:symbol "port15" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 16 ; + lv2:name "Value Step 11" ; + lv2:symbol "port16" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 17 ; + lv2:name "Value Step 12" ; + lv2:symbol "port17" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 18 ; + lv2:name "Value Step 13" ; + lv2:symbol "port18" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 19 ; + lv2:name "Value Step 14" ; + lv2:symbol "port19" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 32 ; + lv2:index 2 ; + lv2:maximum 32 ; + lv2:minimum 1 ; + lv2:name "Loop Steps (1 - 32)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port2" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 20 ; + lv2:name "Value Step 15" ; + lv2:symbol "port20" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 21 ; + lv2:name "Value Step 16" ; + lv2:symbol "port21" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 22 ; + lv2:name "Value Step 17" ; + lv2:symbol "port22" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 23 ; + lv2:name "Value Step 18" ; + lv2:symbol "port23" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 24 ; + lv2:name "Value Step 19" ; + lv2:symbol "port24" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 25 ; + lv2:name "Value Step 20" ; + lv2:symbol "port25" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 26 ; + lv2:name "Value Step 21" ; + lv2:symbol "port26" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 27 ; + lv2:name "Value Step 22" ; + lv2:symbol "port27" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 28 ; + lv2:name "Value Step 23" ; + lv2:symbol "port28" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 29 ; + lv2:name "Value Step 24" ; + lv2:symbol "port29" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Reset to Value on Gate Close?" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port3" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 30 ; + lv2:name "Value Step 25" ; + lv2:symbol "port30" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 31 ; + lv2:name "Value Step 26" ; + lv2:symbol "port31" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 32 ; + lv2:name "Value Step 27" ; + lv2:symbol "port32" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 33 ; + lv2:name "Value Step 28" ; + lv2:symbol "port33" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 34 ; + lv2:name "Value Step 29" ; + lv2:symbol "port34" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 35 ; + lv2:name "Value Step 30" ; + lv2:symbol "port35" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 36 ; + lv2:name "Value Step 31" ; + lv2:symbol "port36" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 37 ; + lv2:name "Value Out" ; + lv2:symbol "port37" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:index 4 ; + lv2:name "Closed Gate Value" ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 5 ; + lv2:name "Value Step 0" ; + lv2:symbol "port5" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Value Step 1" ; + lv2:symbol "port6" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 7 ; + lv2:name "Value Step 2" ; + lv2:symbol "port7" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 8 ; + lv2:name "Value Step 3" ; + lv2:symbol "port8" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 9 ; + lv2:name "Value Step 4" ; + lv2:symbol "port9" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1676> ; + dc:rights "GPL" ; + doap:name "Analogue Style 32 Step Sequencer" ; + lv2:documentation """ +<p>Simulates an analogue step sequencer. The sequencer stores a number of +values which are stepped through using a trigger when the gate is open, looping +after a given number of steps. This variant has 32 steps.</p> + +<p>When the gate is closed, the sequencer returns to the start. Output when +the gate is closed can be set to a default value. If not, it will just output +the last value reached before the gate was closed.</p> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/sequencer_64.ttl b/blip.lv2/sequencer_64.ttl new file mode 100644 index 0000000..c38b82e --- /dev/null +++ b/blip.lv2/sequencer_64.ttl @@ -0,0 +1,528 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:sequencer_64 + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Gate (Open > 0)" ; + lv2:symbol "port0" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Step Trigger" ; + lv2:symbol "port1" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 10 ; + lv2:name "Value Step 5" ; + lv2:symbol "port10" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 11 ; + lv2:name "Value Step 6" ; + lv2:symbol "port11" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 12 ; + lv2:name "Value Step 7" ; + lv2:symbol "port12" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 13 ; + lv2:name "Value Step 8" ; + lv2:symbol "port13" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 14 ; + lv2:name "Value Step 9" ; + lv2:symbol "port14" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 15 ; + lv2:name "Value Step 10" ; + lv2:symbol "port15" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 16 ; + lv2:name "Value Step 11" ; + lv2:symbol "port16" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 17 ; + lv2:name "Value Step 12" ; + lv2:symbol "port17" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 18 ; + lv2:name "Value Step 13" ; + lv2:symbol "port18" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 19 ; + lv2:name "Value Step 14" ; + lv2:symbol "port19" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 64 ; + lv2:index 2 ; + lv2:maximum 64 ; + lv2:minimum 1 ; + lv2:name "Loop Steps (1 - 64)" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port2" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 20 ; + lv2:name "Value Step 15" ; + lv2:symbol "port20" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 21 ; + lv2:name "Value Step 16" ; + lv2:symbol "port21" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 22 ; + lv2:name "Value Step 17" ; + lv2:symbol "port22" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 23 ; + lv2:name "Value Step 18" ; + lv2:symbol "port23" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 24 ; + lv2:name "Value Step 19" ; + lv2:symbol "port24" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 25 ; + lv2:name "Value Step 20" ; + lv2:symbol "port25" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 26 ; + lv2:name "Value Step 21" ; + lv2:symbol "port26" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 27 ; + lv2:name "Value Step 22" ; + lv2:symbol "port27" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 28 ; + lv2:name "Value Step 23" ; + lv2:symbol "port28" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 29 ; + lv2:name "Value Step 24" ; + lv2:symbol "port29" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0 ; + lv2:index 3 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Reset to Value on Gate Close?" ; + lv2:portProperty lv2:integer ; + lv2:symbol "port3" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 30 ; + lv2:name "Value Step 25" ; + lv2:symbol "port30" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 31 ; + lv2:name "Value Step 26" ; + lv2:symbol "port31" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 32 ; + lv2:name "Value Step 27" ; + lv2:symbol "port32" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 33 ; + lv2:name "Value Step 28" ; + lv2:symbol "port33" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 34 ; + lv2:name "Value Step 29" ; + lv2:symbol "port34" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 35 ; + lv2:name "Value Step 30" ; + lv2:symbol "port35" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 36 ; + lv2:name "Value Step 31" ; + lv2:symbol "port36" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 37 ; + lv2:name "Value Step 32" ; + lv2:symbol "port37" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 38 ; + lv2:name "Value Step 33" ; + lv2:symbol "port38" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 39 ; + lv2:name "Value Step 34" ; + lv2:symbol "port39" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 4 ; + lv2:name "Closed Gate Value" ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 40 ; + lv2:name "Value Step 35" ; + lv2:symbol "port40" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 41 ; + lv2:name "Value Step 36" ; + lv2:symbol "port41" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 42 ; + lv2:name "Value Step 37" ; + lv2:symbol "port42" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 43 ; + lv2:name "Value Step 38" ; + lv2:symbol "port43" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 44 ; + lv2:name "Value Step 39" ; + lv2:symbol "port44" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 45 ; + lv2:name "Value Step 40" ; + lv2:symbol "port45" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 46 ; + lv2:name "Value Step 41" ; + lv2:symbol "port46" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 47 ; + lv2:name "Value Step 42" ; + lv2:symbol "port47" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 48 ; + lv2:name "Value Step 43" ; + lv2:symbol "port48" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 49 ; + lv2:name "Value Step 44" ; + lv2:symbol "port49" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 5 ; + lv2:name "Value Step 0" ; + lv2:symbol "port5" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 50 ; + lv2:name "Value Step 45" ; + lv2:symbol "port50" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 51 ; + lv2:name "Value Step 46" ; + lv2:symbol "port51" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 52 ; + lv2:name "Value Step 47" ; + lv2:symbol "port52" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 53 ; + lv2:name "Value Step 48" ; + lv2:symbol "port53" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 54 ; + lv2:name "Value Step 49" ; + lv2:symbol "port54" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 55 ; + lv2:name "Value Step 50" ; + lv2:symbol "port55" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 56 ; + lv2:name "Value Step 51" ; + lv2:symbol "port56" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 57 ; + lv2:name "Value Step 52" ; + lv2:symbol "port57" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 58 ; + lv2:name "Value Step 53" ; + lv2:symbol "port58" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 59 ; + lv2:name "Value Step 54" ; + lv2:symbol "port59" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Value Step 1" ; + lv2:symbol "port6" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 60 ; + lv2:name "Value Step 55" ; + lv2:symbol "port60" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 61 ; + lv2:name "Value Step 56" ; + lv2:symbol "port61" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 62 ; + lv2:name "Value Step 57" ; + lv2:symbol "port62" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 63 ; + lv2:name "Value Step 58" ; + lv2:symbol "port63" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 64 ; + lv2:name "Value Step 59" ; + lv2:symbol "port64" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 65 ; + lv2:name "Value Step 60" ; + lv2:symbol "port65" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 66 ; + lv2:name "Value Step 61" ; + lv2:symbol "port66" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 67 ; + lv2:name "Value Step 62" ; + lv2:symbol "port67" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 68 ; + lv2:name "Value Step 63" ; + lv2:symbol "port68" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 69 ; + lv2:name "Value Out" ; + lv2:symbol "port69" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] , [ + lv2:index 7 ; + lv2:name "Value Step 2" ; + lv2:symbol "port7" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 8 ; + lv2:name "Value Step 3" ; + lv2:symbol "port8" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 9 ; + lv2:name "Value Step 4" ; + lv2:symbol "port9" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1675> ; + dc:rights "GPL" ; + doap:name "Analogue Style 64 Step Sequencer" ; + lv2:documentation """ +<p>Simulates an analogue step sequencer. The sequencer stores a number of +values which are stepped through using a trigger when the gate is open, looping +after a given number of steps. This variant has 64 steps.</p> + +<p>When the gate is closed, the sequencer returns to the start. Output when +the gate is closed can be set to a default value. If not, it will just output +the last value reached before the gate was closed.</p> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/square.ttl b/blip.lv2/square.ttl new file mode 100644 index 0000000..0bd81d4 --- /dev/null +++ b/blip.lv2/square.ttl @@ -0,0 +1,44 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:square + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:maximum 0.5 ; + lv2:minimum 0.000001 ; + lv2:default 440.0 ; + lv2:name "Frequency" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Output" ; + lv2:symbol "port1" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1643> , + <urn:ladspa:1644> ; + dc:rights "GPL" ; + doap:name "Square Oscillator" ; + lv2:documentation """ +<p>Generates an alias-free square wave at given input frequency.</p> +""" ; + a lv2:Plugin , lv2:OscillatorPlugin . diff --git a/blip.lv2/sum.ttl b/blip.lv2/sum.ttl new file mode 100644 index 0000000..56c00ea --- /dev/null +++ b/blip.lv2/sum.ttl @@ -0,0 +1,47 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:sum + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Input 1" ; + lv2:symbol "in1" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Input 2" ; + lv2:symbol "in2" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Sum" ; + lv2:symbol "sum" ; + a lv2:CVPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1665> , + <urn:ladspa:1666> , + <urn:ladspa:1667> ; + dc:rights "GPL" ; + doap:name "Signal Sum" ; + lv2:documentation """ +<p>Add two signals.</p> +""" ; + a lv2:Plugin , lv2:UtilityPlugin . diff --git a/blip.lv2/sync_pulse.ttl b/blip.lv2/sync_pulse.ttl new file mode 100644 index 0000000..9814a65 --- /dev/null +++ b/blip.lv2/sync_pulse.ttl @@ -0,0 +1,60 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:sync_pulse + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:default 16 ; + lv2:index 0 ; + lv2:maximum 64 ; + lv2:minimum 0 ; + lv2:name "Frequency" ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0.5 ; + lv2:index 1 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Pulse Width" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Gate" ; + lv2:symbol "port2" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 3 ; + lv2:name "Output" ; + lv2:symbol "port3" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:2023> , + <urn:ladspa:2024> ; + dc:rights "GPL" ; + doap:name "Clock Pulse Oscillator with Gate" ; + lv2:documentation """ +<p>Same as the <a href="http://drobilla.net/plugins/blip/sync_square">Clock +Oscillator</a>, but with pulse-width modulation.</p> +""" ; + a lv2:Plugin , lv2:OscillatorPlugin . diff --git a/blip.lv2/sync_square.ttl b/blip.lv2/sync_square.ttl new file mode 100644 index 0000000..85be37c --- /dev/null +++ b/blip.lv2/sync_square.ttl @@ -0,0 +1,53 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:sync_square + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:default 16 ; + lv2:index 0 ; + lv2:maximum 64 ; + lv2:minimum 0 ; + lv2:name "Frequency" ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 1 ; + lv2:name "Gate" ; + lv2:symbol "port1" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Output" ; + lv2:symbol "port2" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1678> , + <urn:ladspa:1679> ; + dc:rights "GPL" ; + doap:name "Clock Oscillator with Gate" ; + lv2:documentation """ +<p>Generates a non-bandlimited simple square waveform for use as a clock. +Useful for triggering the sequencers, or anything else that uses a clock +signal.</p> + +<p>When the gate is closed, it outputs silence, and the phase is reset.</p> +""" ; + a lv2:Plugin , lv2:OscillatorPlugin . diff --git a/blip.lv2/tracker.ttl b/blip.lv2/tracker.ttl new file mode 100644 index 0000000..2894986 --- /dev/null +++ b/blip.lv2/tracker.ttl @@ -0,0 +1,116 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:tracker + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:name "Gate" ; + lv2:symbol "port0" ; + a lv2:CVPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 100 ; + lv2:index 1 ; + lv2:maximum 0.5 ; + lv2:minimum "2.08333e-05"^^xsd:double ; + lv2:name "Attack Rate (Hz) when Gate High" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 100 ; + lv2:index 2 ; + lv2:maximum 0.5 ; + lv2:minimum "2.08333e-05"^^xsd:double ; + lv2:name "Decay Rate (Hz) when Gate High" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port2" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 100 ; + lv2:index 3 ; + lv2:maximum 0.5 ; + lv2:minimum "2.08333e-05"^^xsd:double ; + lv2:name "Attack Rate (Hz) when Gate Low" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port3" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 100 ; + lv2:index 4 ; + lv2:maximum 0.5 ; + lv2:minimum "2.08333e-05"^^xsd:double ; + lv2:name "Decay Rate (Hz) when Gate Low" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port4" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 5 ; + lv2:name "Input" ; + lv2:symbol "port5" ; + a lv2:AudioPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 6 ; + lv2:name "Output" ; + lv2:symbol "port6" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:2025> , + <urn:ladspa:2026> ; + dc:rights "GPL" ; + doap:name "Signal Tracker" ; + lv2:documentation """ +<p>This tracks an incoming signal and outputs the result.</p> +<p>The rate controls tell the plugin how quickly to respond to a change in +input. Low values will mean a slower response - a setting of 0 will hold the +last value, and a very high value will track the input exactly.</p> +<p>Attack rate is how quickly an upward change is tracked, and Decay for +downward changes. There are two pairs of these - the one used depends on the +level of the Gate.</p> +<p>Example uses:</p> +<ul> + <li> + <em>An envelope tracker</em>- use the ‘Gate Low’ track rates with + the Gate held low, and run the output through a full-wave rectifier (an ABS() + operator) to get an estimate of the level of a signal.</li> + <li> + <em>Sample and Hold</em>- run a narrow pulse wave into the gate, set the + ‘Gate High’ rates to maximum, and the ‘Gate Low’ + rates set to 0.</li> + <li> + <em>Track and Hold</em>- run a variable pulse wave into the gate, set the + ‘Gate High’ rates to 0, and the ‘Gate Low’ rates set + high. Varying the pulsewidth will vary the time the input is tracked, and + when it is held.</li> +</ul> +""" ; + a lv2:Plugin . diff --git a/blip.lv2/triangle.ttl b/blip.lv2/triangle.ttl new file mode 100644 index 0000000..76c9d67 --- /dev/null +++ b/blip.lv2/triangle.ttl @@ -0,0 +1,58 @@ +@prefix blip: <http://drobilla.net/plugins/blip/> . +@prefix dc: <http://purl.org/dc/elements/1.1/> . +@prefix dct: <http://purl.org/dc/terms/> . +@prefix doap: <http://usefulinc.com/ns/doap#> . +@prefix foaf: <http://xmlns.com/foaf/0.1/> . +@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 xsd: <http://www.w3.org/2001/XMLSchema#> . + +blip:triangle + lv2:microVersion 0 ; + lv2:minorVersion 0 ; + lv2:optionalFeature lv2:hardRTCapable ; + lv2:port [ + lv2:index 0 ; + lv2:maximum 0.5 ; + lv2:minimum 0.000001 ; + lv2:default 440.0 ; + lv2:name "Frequency" ; + lv2:portProperty <http://lv2plug.in/ns/ext/port-props#logarithmic> , + lv2:sampleRate ; + lv2:symbol "port0" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:default 0.5 ; + lv2:index 1 ; + lv2:maximum 1 ; + lv2:minimum 0 ; + lv2:name "Slope" ; + lv2:symbol "port1" ; + a lv2:ControlPort , + lv2:InputPort , + lv2:Port + ] , [ + lv2:index 2 ; + lv2:name "Output" ; + lv2:symbol "port2" ; + a lv2:AudioPort , + lv2:OutputPort , + lv2:Port + ] ; + dc:creator "Mike Rawes <mike_rawes[at]yahoo.co.uk>" ; + dct:replaces <urn:ladspa:1649> , + <urn:ladspa:1650> , + <urn:ladspa:1651> , + <urn:ladspa:1652> ; + dc:rights "GPL" ; + doap:name "Variable Slope Triangle Oscillator" ; + lv2:documentation """ +<p>Generates an alias-free variable slope triangle wave at given input +frequency and slope. The slope changes the wave shape from sawtooth to +triangle.</p> +""" ; + a lv2:Plugin , lv2:OscillatorPlugin . @@ -117,8 +117,8 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runAdsr(LV2_Handle instance, + uint32_t sample_count) { Adsr* plugin = (Adsr*)instance; @@ -236,11 +236,11 @@ run(LV2_Handle instance, } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/adsr", + "http://drobilla.net/plugins/blip/adsr", instantiate, connect_port, activate, - run, + runAdsr, NULL, cleanup, NULL, diff --git a/src/adsr_gt.c b/src/adsr_gt.c index 055e2b2..77bec65 100644 --- a/src/adsr_gt.c +++ b/src/adsr_gt.c @@ -119,8 +119,8 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runAdsr(LV2_Handle instance, + uint32_t sample_count) { Adsr* plugin = (Adsr*)instance; @@ -244,11 +244,11 @@ run(LV2_Handle instance, } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/adsr_gt", + "http://drobilla.net/plugins/blip/adsr_gt", instantiate, connect_port, activate, - run, + runAdsr, NULL, cleanup, NULL, @@ -18,10 +18,8 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "math_func.h" -#include "uris.h" #define AMP_GAIN 0 #define AMP_INPUT 1 @@ -31,8 +29,6 @@ typedef struct { const float* gain; const float* input; float* output; - URIs uris; - uint32_t gain_is_cv; } Amp; static void @@ -61,28 +57,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Amp* plugin = (Amp*)instance; - switch (port) { - case AMP_GAIN: - if (type == plugin->uris.lv2_ControlPort) { - plugin->gain_is_cv = 0; - } else if (type == plugin->uris.lv2_CVPort) { - plugin->gain_is_cv = 1; - } else { - return LV2_MORPH_ERR_BAD_TYPE; - } - return LV2_MORPH_SUCCESS; - default: - return LV2_MORPH_ERR_BAD_PORT; - } -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -91,15 +65,12 @@ instantiate(const LV2_Descriptor* descriptor, { Amp* plugin = (Amp*)malloc(sizeof(Amp)); - plugin->gain_is_cv = 0; - map_uris(&plugin->uris, features); - return (LV2_Handle)plugin; } static void -run(LV2_Handle instance, - uint32_t sample_count) +runAmp_gaia_oa(LV2_Handle instance, + uint32_t sample_count) { Amp* plugin = (Amp*)instance; @@ -112,33 +83,50 @@ run(LV2_Handle instance, /* Output */ float* output = plugin->output; + float gn; + float in; + float scale; + for (uint32_t s = 0; s < sample_count; ++s) { - const float gn = gain[s * plugin->gain_is_cv]; - const float scale = (float)EXPF(M_LN10 * gn * 0.05f); + gn = gain[s]; + in = input[s]; - output[s] = scale * input[s]; + scale = (float)EXPF(M_LN10 * gn * 0.05f); + + output[s] = scale * in; } } -static const void* -extension_data(const char* uri) +static void +runAmp_gcia_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Amp* plugin = (Amp*)instance; + + /* Gain (dB) */ + const float gain = *(plugin->gain); + + /* Input */ + const float* input = plugin->input; + + /* Output */ + float* output = plugin->output; + + const float scale = (float)EXPF(M_LN10 * gain * 0.05f); + for (uint32_t s = 0; s < sample_count; s++) { + output[s] = scale * input[s]; } - return NULL; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/amp", + "http://drobilla.net/plugins/blip/amp", instantiate, connect_port, NULL, - run, + runAmp_gcia_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/branch.c b/src/branch.c index f4c92a0..4625e5c 100644 --- a/src/branch.c +++ b/src/branch.c @@ -113,7 +113,7 @@ runBranch_ic_ococ(LV2_Handle instance, } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/branch", + "http://drobilla.net/plugins/blip/branch", instantiate, connect_port, NULL, diff --git a/src/dahdsr.c b/src/dahdsr.c index 16a1334..cfddb6b 100644 --- a/src/dahdsr.c +++ b/src/dahdsr.c @@ -18,10 +18,8 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "common.h" -#include "uris.h" #define DAHDSR_GATE 0 #define DAHDSR_TRIGGER 1 @@ -59,15 +57,8 @@ typedef struct { float last_trigger; float from_level; float level; - uint32_t delay_is_cv; - uint32_t attack_is_cv; - uint32_t hold_is_cv; - uint32_t decay_is_cv; - uint32_t sustain_is_cv; - uint32_t release_is_cv; DAHDSRState state; uint32_t samples; - URIs uris; } Dahdsr; static void @@ -114,45 +105,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Dahdsr* plugin = (Dahdsr*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case DAHDSR_DELAY: - plugin->delay_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case DAHDSR_ATTACK: - plugin->attack_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case DAHDSR_HOLD: - plugin->hold_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case DAHDSR_DECAY: - plugin->decay_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case DAHDSR_SUSTAIN: - plugin->sustain_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case DAHDSR_RELEASE: - plugin->release_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -164,15 +116,6 @@ instantiate(const LV2_Descriptor* descriptor, plugin->srate = (float)sample_rate; plugin->inv_srate = 1.0f / plugin->srate; - plugin->delay_is_cv = 0; - plugin->attack_is_cv = 0; - plugin->hold_is_cv = 0; - plugin->decay_is_cv = 0; - plugin->sustain_is_cv = 0; - plugin->release_is_cv = 0; - - map_uris(&plugin->uris, features); - return (LV2_Handle)plugin; } @@ -190,8 +133,8 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runDahdsr_Audio(LV2_Handle instance, + uint32_t sample_count) { Dahdsr* plugin = (Dahdsr*)instance; @@ -232,26 +175,20 @@ run(LV2_Handle instance, DAHDSRState state = plugin->state; uint32_t samples = plugin->samples; + float gat, trg, del, att, hld, dec, sus, rel; float elapsed; for (uint32_t s = 0; s < sample_count; ++s) { - const float dl = delay[s * plugin->delay_is_cv]; - const float at = attack[s * plugin->attack_is_cv]; - const float hl = hold[s * plugin->hold_is_cv]; - const float dc = decay[s * plugin->decay_is_cv]; - const float st = sustain[s * plugin->sustain_is_cv]; - const float rl = release[s * plugin->release_is_cv]; - /* Convert times into rates */ - const float del = dl > 0.0f ? inv_srate / dl : srate; - const float att = at > 0.0f ? inv_srate / at : srate; - const float hld = hl > 0.0f ? inv_srate / hl : srate; - const float dec = dc > 0.0f ? inv_srate / dc : srate; - const float rel = rl > 0.0f ? inv_srate / rl : srate; + del = delay[s] > 0.0f ? inv_srate / delay[s] : srate; + att = attack[s] > 0.0f ? inv_srate / attack[s] : srate; + hld = hold[s] > 0.0f ? inv_srate / hold[s] : srate; + dec = decay[s] > 0.0f ? inv_srate / decay[s] : srate; + rel = release[s] > 0.0f ? inv_srate / release[s] : srate; - const float gat = gate[s]; - const float trg = trigger[s]; - const float sus = f_clip(st, 0.0f, 1.0f); + gat = gate[s]; + trg = trigger[s]; + sus = f_clip(sustain[s], 0.0f, 1.0f); /* Initialise delay phase if gate is opened and was closed, or we received a trigger */ @@ -373,25 +310,369 @@ run(LV2_Handle instance, plugin->samples = samples; } -static const void* -extension_data(const char* uri) +static void +runDahdsr_Control(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Dahdsr* plugin = (Dahdsr*)instance; + + /* Gate */ + const float* gate = plugin->gate; + + /* Trigger */ + const float* trigger = plugin->trigger; + + /* Delay Time (s) */ + const float delay = *(plugin->delay); + + /* Attack Time (s) */ + const float attack = *(plugin->attack); + + /* Hold Time (s) */ + const float hold = *(plugin->hold); + + /* Decay Time (s) */ + const float decay = *(plugin->decay); + + /* Sustain Level */ + const float sustain = *(plugin->sustain); + + /* Release Time (s) */ + const float release = *(plugin->release); + + /* Envelope Out */ + float* output = plugin->output; + + /* Instance Data */ + float srate = plugin->srate; + float inv_srate = plugin->inv_srate; + float last_gate = plugin->last_gate; + float last_trigger = plugin->last_trigger; + float from_level = plugin->from_level; + float level = plugin->level; + DAHDSRState state = plugin->state; + uint32_t samples = plugin->samples; + + float gat, trg, del, att, hld, dec, sus, rel; + float elapsed; + + /* Convert times into rates */ + del = delay > 0.0f ? inv_srate / delay : srate; + att = attack > 0.0f ? inv_srate / attack : srate; + hld = hold > 0.0f ? inv_srate / hold : srate; + dec = decay > 0.0f ? inv_srate / decay : srate; + rel = release > 0.0f ? inv_srate / release : srate; + + sus = f_clip(sustain, 0.0f, 1.0f); + + for (uint32_t s = 0; s < sample_count; ++s) { + gat = gate[s]; + trg = trigger[s]; + + /* Initialise delay phase if gate is opened and was closed, or + we received a trigger */ + if ((trg > 0.0f && !(last_trigger > 0.0f)) + || (gat > 0.0f && !(last_gate > 0.0f))) { + if (del < srate) { + state = DELAY; + } else if (att < srate) { + state = ATTACK; + } else { + state = hld < srate ? HOLD + : (dec < srate ? DECAY + : (gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE))); + level = 1.0f; + } + samples = 0; + } + + /* Release if gate was open and now closed */ + if (state != IDLE && state != RELEASE + && last_gate > 0.0f && !(gat > 0.0f)) { + state = rel < srate ? RELEASE : IDLE; + samples = 0; + } + + if (samples == 0) { + from_level = level; + } + + /* Calculate level of envelope from current state */ + switch (state) { + case IDLE: + level = 0; + break; + case DELAY: + samples++; + elapsed = (float)samples * del; + if (elapsed > 1.0f) { + state = att < srate ? ATTACK + : (hld < srate ? HOLD + : (dec < srate ? DECAY + : (gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE)))); + samples = 0; + } + break; + case ATTACK: + samples++; + elapsed = (float)samples * att; + if (elapsed > 1.0f) { + state = hld < srate ? HOLD + : (dec < srate ? DECAY + : (gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE))); + level = 1.0f; + samples = 0; + } else { + level = from_level + elapsed * (1.0f - from_level); + } + break; + case HOLD: + samples++; + elapsed = (float)samples * hld; + if (elapsed > 1.0f) { + state = dec < srate ? DECAY + : (gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE)); + samples = 0; + } + break; + case DECAY: + samples++; + elapsed = (float)samples * dec; + if (elapsed > 1.0f) { + state = gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE); + level = sus; + samples = 0; + } else { + level = from_level + elapsed * (sus - from_level); + } + break; + case SUSTAIN: + level = sus; + break; + case RELEASE: + samples++; + elapsed = (float)samples * rel; + if (elapsed > 1.0f) { + state = IDLE; + level = 0.0f; + samples = 0; + } else { + level = from_level - elapsed * from_level; + } + break; + default: + /* Should never happen */ + level = 0.0f; + } + + output[s] = level; + + last_gate = gat; + last_trigger = trg; } - return NULL; + + plugin->last_gate = last_gate; + plugin->last_trigger = last_trigger; + plugin->from_level = from_level; + plugin->level = level; + plugin->state = state; + plugin->samples = samples; +} + +static void +runDahdsr_CGT_Control(LV2_Handle instance, + uint32_t sample_count) +{ + Dahdsr* plugin = (Dahdsr*)instance; + + /* Gate */ + const float gate = *(plugin->gate); + + /* Trigger */ + const float trigger = *(plugin->trigger); + + /* Delay Time (s) */ + const float delay = *(plugin->delay); + + /* Attack Time (s) */ + const float attack = *(plugin->attack); + + /* Hold Time (s) */ + const float hold = *(plugin->hold); + + /* Decay Time (s) */ + const float decay = *(plugin->decay); + + /* Sustain Level */ + const float sustain = *(plugin->sustain); + + /* Release Time (s) */ + const float release = *(plugin->release); + + /* Envelope Out */ + float* output = plugin->output; + + /* Instance Data */ + float srate = plugin->srate; + float inv_srate = plugin->inv_srate; + float last_gate = plugin->last_gate; + float last_trigger = plugin->last_trigger; + float from_level = plugin->from_level; + float level = plugin->level; + DAHDSRState state = plugin->state; + uint32_t samples = plugin->samples; + + float gat, trg, del, att, hld, dec, sus, rel; + float elapsed; + + /* Convert times into rates */ + del = delay > 0.0f ? inv_srate / delay : srate; + att = attack > 0.0f ? inv_srate / attack : srate; + hld = hold > 0.0f ? inv_srate / hold : srate; + dec = decay > 0.0f ? inv_srate / decay : srate; + rel = release > 0.0f ? inv_srate / release : srate; + + gat = gate; + trg = trigger; + sus = f_clip(sustain, 0.0f, 1.0f); + + /* Initialise delay phase if gate is opened and was closed, or + we received a trigger */ + if ((trg > 0.0f && !(last_trigger > 0.0f)) + || (gat > 0.0f && !(last_gate > 0.0f))) { + if (del < srate) { + state = DELAY; + } else if (att < srate) { + state = ATTACK; + } else { + state = hld < srate ? HOLD + : (dec < srate ? DECAY + : (gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE))); + level = 1.0f; + } + samples = 0; + } + + /* Release if gate was open and now closed */ + if (state != IDLE && state != RELEASE + && last_gate > 0.0f && !(gat > 0.0f)) { + state = rel < srate ? RELEASE : IDLE; + samples = 0; + } + + for (uint32_t s = 0; s < sample_count; ++s) { + if (samples == 0) { + from_level = level; + } + + /* Calculate level of envelope from current state */ + switch (state) { + case IDLE: + level = 0; + break; + case DELAY: + samples++; + elapsed = (float)samples * del; + if (elapsed > 1.0f) { + state = att < srate ? ATTACK + : (hld < srate ? HOLD + : (dec < srate ? DECAY + : (gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE)))); + samples = 0; + } + break; + case ATTACK: + samples++; + elapsed = (float)samples * att; + if (elapsed > 1.0f) { + state = hld < srate ? HOLD + : (dec < srate ? DECAY + : (gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE))); + level = 1.0f; + samples = 0; + } else { + level = from_level + elapsed * (1.0f - from_level); + } + break; + case HOLD: + samples++; + elapsed = (float)samples * hld; + if (elapsed > 1.0f) { + state = dec < srate ? DECAY + : (gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE)); + samples = 0; + } + break; + case DECAY: + samples++; + elapsed = (float)samples * dec; + if (elapsed > 1.0f) { + state = gat > 0.0f ? SUSTAIN + : (rel < srate ? RELEASE + : IDLE); + level = sus; + samples = 0; + } else { + level = from_level + elapsed * (sus - from_level); + } + break; + case SUSTAIN: + level = sus; + break; + case RELEASE: + samples++; + elapsed = (float)samples * rel; + if (elapsed > 1.0f) { + state = IDLE; + level = 0.0f; + samples = 0; + } else { + level = from_level - elapsed * from_level; + } + break; + default: + /* Should never happen */ + level = 0.0f; + } + + output[s] = level; + } + + plugin->last_gate = gat; + plugin->last_trigger = trg; + plugin->from_level = from_level; + plugin->level = level; + plugin->state = state; + plugin->samples = samples; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/dahdsr", + "http://drobilla.net/plugins/blip/dahdsr", instantiate, connect_port, activate, - run, + runDahdsr_Control, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/difference.c b/src/difference.c index 1a9db38..bee9552 100644 --- a/src/difference.c +++ b/src/difference.c @@ -18,22 +18,16 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" -#define DIFFERENCE_MINUEND 0 -#define DIFFERENCE_SUBTRAHEND 1 -#define DIFFERENCE_DIFFERENCE 2 +#define DIFFERENCE_INPUT 0 +#define DIFFERENCE_MINUS 1 +#define DIFFERENCE_OUTPUT 2 typedef struct { - float* minuend; - float* subtrahend; - float* difference; - uint32_t minuend_is_cv; - uint32_t subtrahend_is_cv; - uint32_t difference_is_cv; - URIs uris; + float* input; + float* minus; + float* output; } Difference; static void @@ -50,128 +44,116 @@ connect_port(LV2_Handle instance, Difference* plugin = (Difference*)instance; switch (port) { - case DIFFERENCE_MINUEND: - plugin->minuend = data; + case DIFFERENCE_INPUT: + plugin->input = data; break; - case DIFFERENCE_SUBTRAHEND: - plugin->subtrahend = data; + case DIFFERENCE_MINUS: + plugin->minus = data; break; - case DIFFERENCE_DIFFERENCE: - plugin->difference = data; + case DIFFERENCE_OUTPUT: + plugin->output = data; break; } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) +static LV2_Handle +instantiate(const LV2_Descriptor* descriptor, + double sample_rate, + const char* bundle_path, + const LV2_Feature* const* features) { - Difference* plugin = (Difference*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case DIFFERENCE_MINUEND: - plugin->minuend_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case DIFFERENCE_SUBTRAHEND: - plugin->subtrahend_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - plugin->difference_is_cv = (plugin->minuend_is_cv || - plugin->subtrahend_is_cv); + Difference* plugin = (Difference*)malloc(sizeof(Difference)); - return LV2_MORPH_SUCCESS; + return (LV2_Handle)plugin; } -static LV2_URID -port_type(LV2_Handle instance, - uint32_t port, - LV2_Morph_Property*const* properties) +static void +runDifference_iama_oa(LV2_Handle instance, + uint32_t sample_count) { Difference* plugin = (Difference*)instance; - switch (port) { - case DIFFERENCE_DIFFERENCE: - return (plugin->difference_is_cv - ? plugin->uris.lv2_CVPort - : plugin->uris.lv2_ControlPort); - default: - return 0; + /* Input (array of floats of length sample_count) */ + const float* input = plugin->input; + + /* Input to Subtract (array of floats of length sample_count) */ + const float* minus = plugin->minus; + + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; + + for (uint32_t s = 0; s < sample_count; ++s) { + output[s] = input[s] - minus[s]; } } -static LV2_Handle -instantiate(const LV2_Descriptor* descriptor, - double sample_rate, - const char* bundle_path, - const LV2_Feature* const* features) +static void +runDifference_iamc_oa(LV2_Handle instance, + uint32_t sample_count) { - Difference* plugin = (Difference*)malloc(sizeof(Difference)); + Difference* plugin = (Difference*)instance; - plugin->minuend_is_cv = 0; - plugin->subtrahend_is_cv = 0; - plugin->difference_is_cv = 0; + /* Input (array of floats of length sample_count) */ + const float* input = plugin->input; - map_uris(&plugin->uris, features); + /* Input to Subtract (float value) */ + const float minus = *(plugin->minus); - return (LV2_Handle)plugin; + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; + + for (uint32_t s = 0; s < sample_count; ++s) { + output[s] = input[s] - minus; + } } static void -run(LV2_Handle instance, - uint32_t sample_count) +runDifference_icma_oa(LV2_Handle instance, + uint32_t sample_count) { Difference* plugin = (Difference*)instance; - /* Minuend (array of floats of length 1 or sample_count) */ - const float* minuend = plugin->minuend; + /* Input (float value) */ + const float input = *(plugin->input); - /* Subtrahend (array of floats of length 1 or sample_count) */ - const float* subtrahend = plugin->subtrahend; + /* Input to Subtract (array of floats of length sample_count) */ + const float* minus = plugin->minus; - /* Difference (array of floats of length 1 or sample_count) */ - float* difference = plugin->difference; - - if (!plugin->difference_is_cv) { /* TODO: Avoid this branch */ - sample_count = 1; - } + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; for (uint32_t s = 0; s < sample_count; ++s) { - const float min = minuend[s * plugin->minuend_is_cv]; - const float sub = subtrahend[s * plugin->subtrahend_is_cv]; - - difference[s] = min - sub; + output[s] = input - minus[s]; } } -static const void* -extension_data(const char* uri) +static void +runDifference_icmc_oc(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, port_type }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; - } - return NULL; + Difference* plugin = (Difference*)instance; + + /* Input (float value) */ + const float input = *(plugin->input); + + /* Input to Subtract (float value) */ + const float minus = *(plugin->minus); + + /* Output Frequency (pointer to float value) */ + float* output = plugin->output; + + output[0] = input - minus; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/difference", + "http://drobilla.net/plugins/blip/difference", instantiate, connect_port, NULL, - run, + runDifference_icmc_oc, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* @@ -18,23 +18,17 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "math_func.h" -#include "uris.h" #define FMOD_FREQUENCY 0 #define FMOD_MODULATOR 1 #define FMOD_OUTPUT 2 typedef struct { - float* frequency; - float* modulator; - float* output; - uint32_t frequency_is_cv; - uint32_t modulator_is_cv; - uint32_t output_is_cv; - URIs uris; + float* frequency; + float* modulator; + float* output; } Fmod; static void @@ -63,50 +57,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Fmod* plugin = (Fmod*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case FMOD_FREQUENCY: - plugin->frequency_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case FMOD_MODULATOR: - plugin->modulator_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - -static LV2_URID -port_type(LV2_Handle instance, - uint32_t port, - LV2_Morph_Property*const* properties) -{ - Fmod* plugin = (Fmod*)instance; - - switch (port) { - case FMOD_FREQUENCY: - return (plugin->output_is_cv - ? plugin->uris.lv2_CVPort - : plugin->uris.lv2_ControlPort); - default: - return 0; - } -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -115,59 +65,121 @@ instantiate(const LV2_Descriptor* descriptor, { Fmod* plugin = (Fmod*)malloc(sizeof(Fmod)); - plugin->frequency_is_cv = 0; - plugin->modulator_is_cv = 0; - return (LV2_Handle)plugin; } static void -run(LV2_Handle instance, - uint32_t sample_count) +runFmod_fama_oa(LV2_Handle instance, + uint32_t sample_count) { Fmod* plugin = (Fmod*)instance; - /* Frequency to Modulate (array of floats of length 1 or sample_count) */ + /* Frequency to Modulate (array of floats of length sample_count) */ const float* frequency = plugin->frequency; - /* LFO Input (array of floats of length 1 or sample_count) */ + /* LFO Input (array of floats of length sample_count) */ const float* modulator = plugin->modulator; - /* Output Frequency (array of floats of length 1 or sample_count) */ + /* Output Frequency (array of floats of length sample_count) */ float* output = plugin->output; - if (!plugin->output_is_cv) { /* TODO: Avoid this branch */ - sample_count = 1; + float freq; + float mod; + float scale; + + for (uint32_t s = 0; s < sample_count; ++s) { + freq = frequency[s]; + mod = modulator[s]; + + scale = (float)EXPF(M_LN2 * mod); + + output[s] = scale * freq; } +} + +static void +runFmod_famc_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Fmod* plugin = (Fmod*)instance; + + /* Frequency to Modulate (array of floats of length sample_count) */ + const float* frequency = plugin->frequency; + + /* Shift (Octaves) (float value) */ + const float modulator = *(plugin->modulator); + + /* Output Frequency (array of floats of length sample_count) */ + float* output = plugin->output; + + float freq; + float scale = (float)EXPF(M_LN2 * modulator); for (uint32_t s = 0; s < sample_count; ++s) { - const float freq = frequency[s * plugin->frequency_is_cv]; - const float mod = modulator[s * plugin->modulator_is_cv]; - const float scale = (float)EXPF(M_LN2 * mod); + freq = frequency[s]; output[s] = scale * freq; } } -static const void* -extension_data(const char* uri) +static void +runFmod_fcma_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, port_type }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Fmod* plugin = (Fmod*)instance; + + /* Frequency to Modulate (float value) */ + const float frequency = *(plugin->frequency); + + /* LFO Input (array of floats of length sample_count) */ + const float* modulator = plugin->modulator; + + /* Output Frequency (array of floats of length sample_count) */ + float* output = plugin->output; + + float mod; + float scale; + + for (uint32_t s = 0; s < sample_count; ++s) { + mod = modulator[s]; + + scale = (float)EXPF(M_LN2 * mod); + + output[s] = scale * frequency; } - return NULL; +} + +static void +runFmod_fcmc_oc(LV2_Handle instance, + uint32_t sample_count) +{ + Fmod* plugin = (Fmod*)instance; + + /* Frequency to Modulate (float value) */ + const float frequency = *(plugin->frequency); + + /* Shift (Octaves) (float value) */ + const float modulator = *(plugin->modulator); + + /* Output Frequency (pointer to float value) */ + float* output = plugin->output; + + float scale; + + scale = (float)EXPF(M_LN2 * modulator); + + output[0] = scale * frequency; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/fmod", + "http://drobilla.net/plugins/blip/fmod", instantiate, connect_port, NULL, - run, + runFmod_fcmc_oc, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/include/common.h b/src/include/common.h index 26a405a..0f30aa1 100644 --- a/src/include/common.h +++ b/src/include/common.h @@ -17,8 +17,8 @@ along with this software. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef blop_common_h -#define blop_common_h +#ifndef blip_common_h +#define blip_common_h #include "math_func.h" @@ -51,4 +51,4 @@ f_clip (float x, float a, float b) return 0.5f * (FABSF (x - a) + a + b - FABSF (x - b)); } -#endif /* blop_common_h */ +#endif /* blip_common_h */ diff --git a/src/include/interpolate.h b/src/include/interpolate.h index 304a817..5fba16a 100644 --- a/src/include/interpolate.h +++ b/src/include/interpolate.h @@ -1,8 +1,8 @@ -#ifndef blop_interpolate_h -#define blop_interpolate_h +#ifndef blip_interpolate_h +#define blip_interpolate_h #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "blop_config.h" +#include "blip_config.h" #include "math_func.h" /** @@ -72,4 +72,4 @@ f_lerp (float value, return value; } -#endif /* blop_interpolate_h */ +#endif /* blip_interpolate_h */ diff --git a/src/include/lp4pole_filter.h b/src/include/lp4pole_filter.h index a6b27f1..adc5cba 100644 --- a/src/include/lp4pole_filter.h +++ b/src/include/lp4pole_filter.h @@ -30,8 +30,8 @@ along with this software. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef blop_lp4pole_filter_h -#define blop_lp4pole_filter_h +#ifndef blip_lp4pole_filter_h +#define blip_lp4pole_filter_h #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "common.h" @@ -134,4 +134,4 @@ lp4pole_run(LP4PoleFilter* lpf, return lpf->out4; } -#endif /* blop_lp4pole_filter_h */ +#endif /* blip_lp4pole_filter_h */ diff --git a/src/include/math_func.h b/src/include/math_func.h index 60f7ce0..2e4b6e4 100644 --- a/src/include/math_func.h +++ b/src/include/math_func.h @@ -7,7 +7,7 @@ #define math_func_h #include <math.h> -#include "blop_config.h" +#include "blip_config.h" #ifndef M_PI # define M_PI 3.14159265358979323846 /* pi */ diff --git a/src/include/uris.h b/src/include/uris.h deleted file mode 100644 index 538bd05..0000000 --- a/src/include/uris.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Common URIs used by plugins. - Copyright 2012 David Robillard - - This is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This software is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this software. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef blop_uris_h -#define blop_uris_h - -#include <string.h> -#include "lv2/lv2plug.in/ns/ext/urid/urid.h" -#include "lv2/lv2plug.in/ns/lv2core/lv2.h" - -typedef struct { - LV2_URID lv2_CVPort; - LV2_URID lv2_ControlPort; -} URIs; - -static inline void -map_uris(URIs* uris, - const LV2_Feature* const* features) -{ - LV2_URID_Map* map = NULL; - for (int i = 0; features[i]; ++i) { - if (!strcmp(features[i]->URI, LV2_URID__map)) { - map = (LV2_URID_Map*)features[i]->data; - break; - } - } - - if (map) { - uris->lv2_ControlPort = map->map(map->handle, LV2_CORE__ControlPort); - uris->lv2_CVPort = map->map(map->handle, LV2_CORE__CVPort); - } else { - memset(uris, 0, sizeof(*uris)); - } -} - -#endif /* blop_uris_h */ diff --git a/src/include/wavedata.h b/src/include/wavedata.h index 9d24823..9bd313c 100644 --- a/src/include/wavedata.h +++ b/src/include/wavedata.h @@ -17,19 +17,19 @@ along with this software. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef blop_wavedata_h -#define blop_wavedata_h +#ifndef blip_wavedata_h +#define blip_wavedata_h #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "blop_config.h" +#include "blip_config.h" #include "math_func.h" #include "interpolate.h" #include "common.h" /* Functions identifying wavedata dlls */ -#define BLOP_DLSYM_SAWTOOTH "blop_get_sawtooth" -#define BLOP_DLSYM_SQUARE "blop_get_square" -#define BLOP_DLSYM_PARABOLA "blop_get_parabola" +#define BLOP_DLSYM_SAWTOOTH "blip_get_sawtooth" +#define BLOP_DLSYM_SQUARE "blip_get_square" +#define BLOP_DLSYM_PARABOLA "blip_get_parabola" /* * Structure holding a single segment of sample data @@ -191,4 +191,4 @@ wavedata_get_table(Wavedata* w, } /* extern "C" { */ #endif -#endif /* blop_wavedata_h */ +#endif /* blip_wavedata_h */ diff --git a/src/include/wdatutil.h b/src/include/wdatutil.h index a084c7a..931a7f3 100644 --- a/src/include/wdatutil.h +++ b/src/include/wdatutil.h @@ -17,8 +17,8 @@ along with this software. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef blop_wdatutil_h -#define blop_wdatutil_h +#ifndef blip_wdatutil_h +#define blip_wdatutil_h #include <stdio.h> #include "lv2/lv2plug.in/ns/lv2core/lv2.h" @@ -138,4 +138,4 @@ int wavedata_write(Wavedata* w, } /* extern "C" { */ #endif -#endif /* blop_wdatutil_h */ +#endif /* blip_wdatutil_h */ diff --git a/src/interpolator.c b/src/interpolator.c index 37574ad..52a6c37 100644 --- a/src/interpolator.c +++ b/src/interpolator.c @@ -93,8 +93,8 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runInterpolator(LV2_Handle instance, + uint32_t sample_count) { Interpolator* plugin = (Interpolator*)instance; @@ -121,11 +121,11 @@ run(LV2_Handle instance, } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/interpolator", + "http://drobilla.net/plugins/blip/interpolator", instantiate, connect_port, activate, - run, + runInterpolator, NULL, cleanup, NULL, diff --git a/src/lp4pole.c b/src/lp4pole.c index 8a7184e..a00ca5b 100644 --- a/src/lp4pole.c +++ b/src/lp4pole.c @@ -18,11 +18,9 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "lp4pole_filter.h" #include "common.h" -#include "uris.h" #define LP4POLE_CUTOFF 0 #define LP4POLE_RESONANCE 1 @@ -35,9 +33,6 @@ typedef struct { float* input; float* output; LP4PoleFilter* lpf; - uint32_t cutoff_is_cv; - uint32_t resonance_is_cv; - URIs uris; } Lp4pole; static void @@ -73,33 +68,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Lp4pole* plugin = (Lp4pole*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case LP4POLE_CUTOFF: - plugin->cutoff_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case LP4POLE_RESONANCE: - plugin->resonance_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -115,10 +83,6 @@ instantiate(const LV2_Descriptor* descriptor, plugin = 0; } } - - plugin->cutoff_is_cv = 0; - plugin->resonance_is_cv = 0; - return (LV2_Handle)plugin; } @@ -131,15 +95,15 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runLp4pole_faraia_oa(LV2_Handle instance, + uint32_t sample_count) { Lp4pole* plugin = (Lp4pole*)instance; - /* Cutoff Frequency (array of floats of length 1 or sample_count) */ + /* Cutoff Frequency (array of floats of length sample_count) */ const float* cutoff = plugin->cutoff; - /* Resonance (array of floats of length 1 or sample_count) */ + /* Resonance (array of floats of length sample_count) */ const float* resonance = plugin->resonance; /* Input (array of floats of length sample_count) */ @@ -151,39 +115,61 @@ run(LV2_Handle instance, /* Instance data */ LP4PoleFilter* lpf = plugin->lpf; + float in; + float co; + float res; + for (uint32_t s = 0; s < sample_count; ++s) { - const float co = cutoff[s * plugin->cutoff_is_cv]; - const float res = resonance[s * plugin->resonance_is_cv]; - const float in = input[s]; + co = cutoff[s]; + res = resonance[s]; + in = input[s]; - /* TODO: There is no branching in this function. - Would it actually be faster to check if co or res has changed? - */ lp4pole_set_params(lpf, co, res); output[s] = lp4pole_run(lpf, in); } } -static const void* -extension_data(const char* uri) +static void +runLp4pole_fcrcia_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Lp4pole* plugin = (Lp4pole*)instance; + + /* Cutoff Frequency (float value) */ + const float cutoff = *(plugin->cutoff); + + /* Resonance (float value) */ + const float resonance = *(plugin->resonance); + + /* Input (array of floats of length sample_count) */ + const float* input = plugin->input; + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + LP4PoleFilter* lpf = plugin->lpf; + + float in; + + lp4pole_set_params(lpf, cutoff, resonance); + + for (uint32_t s = 0; s < sample_count; ++s) { + in = input[s]; + output[s] = lp4pole_run(lpf, in); } - return NULL; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/lp4pole", + "http://drobilla.net/plugins/blip/lp4pole", instantiate, connect_port, activate, - run, + runLp4pole_fcrcia_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/product.c b/src/product.c index 10872ab..0b892a1 100644 --- a/src/product.c +++ b/src/product.c @@ -18,22 +18,16 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" #define PRODUCT_MULTIPLICAND 0 #define PRODUCT_MULTIPLIER 1 #define PRODUCT_PRODUCT 2 typedef struct { - float* input1; - float* input2; - float* output; - uint32_t input1_is_cv; - uint32_t input2_is_cv; - uint32_t output_is_cv; - URIs uris; + float* input1; + float* input2; + float* output; } Product; static void @@ -62,51 +56,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Product* plugin = (Product*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case PRODUCT_MULTIPLICAND: - plugin->input1_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case PRODUCT_MULTIPLIER: - plugin->input2_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - plugin->output_is_cv = plugin->input1_is_cv || plugin->input2_is_cv; - return LV2_MORPH_SUCCESS; -} - -static LV2_URID -port_type(LV2_Handle instance, - uint32_t port, - LV2_Morph_Property*const* properties) -{ - Product* plugin = (Product*)instance; - - switch (port) { - case PRODUCT_PRODUCT: - return (plugin->output_is_cv - ? plugin->uris.lv2_CVPort - : plugin->uris.lv2_ControlPort); - default: - return 0; - } -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -115,60 +64,76 @@ instantiate(const LV2_Descriptor* descriptor, { Product* plugin = (Product*)malloc(sizeof(Product)); - plugin->input1_is_cv = 0; - plugin->input2_is_cv = 0; - plugin->output_is_cv = 0; - - map_uris(&plugin->uris, features); - return (LV2_Handle)plugin; } static void -run(LV2_Handle instance, - uint32_t sample_count) +runProduct_iaia_oa(LV2_Handle instance, + uint32_t sample_count) { Product* plugin = (Product*)instance; - /* First Input (array of floats of length 1 or sample_count) */ + /* First Input (array of floats of length sample_count) */ const float* input1 = plugin->input1; - /* Second Input (array of floats of length 1 or sample_count) */ + /* Second Input (array of floats of length sample_count) */ const float* input2 = plugin->input2; /* Output (array of floats of length sample_count) */ float* output = plugin->output; - if (!plugin->output_is_cv) { /* TODO: Avoid this branch */ - sample_count = 1; + for (uint32_t s = 0; s < sample_count; ++s) { + output[s] = input1[s] * input2[s]; } +} + +static void +runProduct_iaic_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Product* plugin = (Product*)instance; + + /* First Input (array of floats of length sample_count) */ + const float* input1 = plugin->input1; + + /* Second Input (float value) */ + const float input2 = *(plugin->input2); + + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; for (uint32_t s = 0; s < sample_count; ++s) { - const float in1 = input1[s * plugin->input1_is_cv]; - const float in2 = input2[s * plugin->input2_is_cv]; - output[s] = in1 * in2; + output[s] = input1[s] * input2; } } -static const void* -extension_data(const char* uri) +static void +runProduct_icic_oc(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, port_type }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; - } - return NULL; + Product* plugin = (Product*)instance; + + /* First Input (float value) */ + const float input1 = *(plugin->input1); + + /* Second Input (float value) */ + const float input2 = *(plugin->input2); + + /* Output (pointer to float value) */ + float* output = plugin->output; + + output[0] = input1 * input2; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/product", + "http://drobilla.net/plugins/blip/product", instantiate, connect_port, NULL, - run, + runProduct_iaia_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/pulse.c b/src/pulse.c index 51b1147..8890fbd 100644 --- a/src/pulse.c +++ b/src/pulse.c @@ -18,9 +18,7 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" #include "wavedata.h" #define PULSE_FREQUENCY 0 @@ -32,10 +30,7 @@ typedef struct { float* pulsewidth; float* output; float phase; - uint32_t frequency_is_cv; - uint32_t pulsewidth_is_cv; Wavedata wdat; - URIs uris; } Pulse; static void @@ -58,33 +53,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Pulse* plugin = (Pulse*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case PULSE_FREQUENCY: - plugin->frequency_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case PULSE_PULSEWIDTH: - plugin->pulsewidth_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -99,11 +67,6 @@ instantiate(const LV2_Descriptor* descriptor, return 0; } - plugin->frequency_is_cv = 0; - plugin->pulsewidth_is_cv = 0; - map_uris(&plugin->uris, features); - wavedata_get_table(&plugin->wdat, 440.0); - return (LV2_Handle)plugin; } @@ -125,8 +88,8 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runPulse_fapa_oa(LV2_Handle instance, + uint32_t sample_count) { Pulse* plugin = (Pulse*)instance; @@ -143,32 +106,114 @@ run(LV2_Handle instance, Wavedata* wdat = &plugin->wdat; float phase = plugin->phase; - float last_pwidth = pulsewidth[0]; - float pwidth = f_clip(last_pwidth, 0.0f, 1.0f); - float dc_shift = 1.0 - (2.0 * pwidth); - float phase_shift = pwidth * wdat->sample_rate; + float freq; + float pwidth; + float phase_shift; for (uint32_t s = 0; s < sample_count; ++s) { - const float freq = frequency[s * plugin->frequency_is_cv]; - if (freq != wdat->frequency) { - /* Frequency changed, look up table to play */ - wavedata_get_table(wdat, freq); + freq = frequency[s]; + pwidth = f_clip(pulsewidth[s], 0.0f, 1.0f); + phase_shift = pwidth * wdat->sample_rate; + + /* Lookup which table to use from frequency */ + wavedata_get_table(wdat, freq); + + /* Get samples from sawtooth and phase shifted inverted sawtooth, + with approriate DC offset */ + output[s] = wavedata_get_sample(wdat, phase) + - wavedata_get_sample(wdat, phase + phase_shift) + + 1.0f - (2.0f * pwidth); + + /* Update phase, wrapping if necessary */ + phase += wdat->frequency; + if (phase < 0.0f) { + phase += wdat->sample_rate; + } else if (phase > wdat->sample_rate) { + phase -= wdat->sample_rate; } + } + plugin->phase = phase; +} + +static void +runPulse_fapc_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Pulse* plugin = (Pulse*)instance; + + /* Frequency (array of float of length sample_count) */ + const float* frequency = plugin->frequency; + + /* Pulse Width (float value) */ + const float pulsewidth = f_clip(*(plugin->pulsewidth), 0.0f, 1.0f); + + /* Output (pointer to float value) */ + float* output = plugin->output; - const float this_pwidth = pulsewidth[s * plugin->pulsewidth_is_cv]; - if (this_pwidth != last_pwidth) { - /* Pulsewidth changed, recalculate */ - last_pwidth = this_pwidth; - pwidth = f_clip(this_pwidth, 0.0f, 1.0f); - dc_shift = 1.0f - (2.0f * pwidth); - phase_shift = pwidth * wdat->sample_rate; + /* Instance data */ + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + + float freq; + float dc_shift = 1.0 - (2.0 * pulsewidth); + float phase_shift = pulsewidth * wdat->sample_rate; + + for (uint32_t s = 0; s < sample_count; ++s) { + freq = frequency[s]; + + /* Lookup which table to use from frequency */ + wavedata_get_table(wdat, freq); + + /* Get samples from sawtooth and phase shifted inverted sawtooth, + with approriate DC offset */ + output[s] = wavedata_get_sample(wdat, phase) + - wavedata_get_sample(wdat, phase + phase_shift) + + dc_shift; + + /* Update phase, wrapping if necessary */ + phase += wdat->frequency; + if (phase < 0.0f) { + phase += wdat->sample_rate; + } else if (phase > wdat->sample_rate) { + phase -= wdat->sample_rate; } + } + plugin->phase = phase; +} + +static void +runPulse_fcpa_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Pulse* plugin = (Pulse*)instance; + + /* Frequency (float value) */ + const float frequency = *(plugin->frequency); + + /* Pulse Width (array of float of length sample_count) */ + const float* pulsewidth = plugin->pulsewidth; + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + + float pwidth; + float phase_shift; + + wavedata_get_table(wdat, frequency); + + for (uint32_t s = 0; s < sample_count; ++s) { + pwidth = f_clip(pulsewidth[s], 0.0f, 1.0f); + phase_shift = pwidth * wdat->sample_rate; /* Get samples from sawtooth and phase shifted inverted sawtooth, with approriate DC offset */ output[s] = wavedata_get_sample(wdat, phase) - wavedata_get_sample(wdat, phase + phase_shift) - + dc_shift; + + 1.0f - (2.0f * pwidth); /* Update phase, wrapping if necessary */ phase += wdat->frequency; @@ -181,25 +226,57 @@ run(LV2_Handle instance, plugin->phase = phase; } -static const void* -extension_data(const char* uri) +static void +runPulse_fcpc_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Pulse* plugin = (Pulse*)instance; + + /* Frequency (float value) */ + const float frequency = *(plugin->frequency); + + /* Pulse Width (float value) */ + const float pulsewidth = f_clip(*(plugin->pulsewidth), 0.0f, 1.0f); + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + + float dc_shift = 1.0f - (2.0f * pulsewidth); + float phase_shift = pulsewidth * wdat->sample_rate; + + wavedata_get_table(wdat, frequency); + + for (uint32_t s = 0; s < sample_count; ++s) { + /* Get samples from sawtooth and phase shifted inverted sawtooth, + with approriate DC offset */ + output[s] = wavedata_get_sample(wdat, phase) + - wavedata_get_sample(wdat, phase + phase_shift) + + dc_shift; + + /* Update phase, wrapping if necessary */ + phase += wdat->frequency; + if (phase < 0.0f) { + phase += wdat->sample_rate; + } else if (phase > wdat->sample_rate) { + phase -= wdat->sample_rate; + } } - return NULL; + plugin->phase = phase; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/pulse", + "http://drobilla.net/plugins/blip/pulse", instantiate, connect_port, activate, - run, + runPulse_fcpc_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/quantiser.c b/src/quantiser.c index 419467f..793da32 100644 --- a/src/quantiser.c +++ b/src/quantiser.c @@ -205,16 +205,54 @@ instantiate(const LV2_Descriptor* descriptor, } static void -run(LV2_Handle instance, - uint32_t sample_count) +runQuantiser_audio(LV2_Handle instance, + uint32_t sample_count) { Quantiser* plugin = (Quantiser*)instance; /* Range Min (float value) */ - float min = *(plugin->min); + const float min = *(plugin->min); /* Range Max (float value) */ - float max = *(plugin->max); + const float max = *(plugin->max); + + /* Match Range (float value) */ + const float match_range = *(plugin->match_range); + + /* Mode (float value) */ + const float mode = *(plugin->mode); + + /* Count (float value) */ + const float count = *(plugin->count); + + /* Input (array of float of length sample_count) */ + const float* input = plugin->input; + + /* Values */ + float* values[QUANTISER_MAX_INPUTS]; + + /* Output (array of float of length sample_count) */ + float* output = plugin->output; + + /* Output Changed (array of float of length sample_count) */ + float* output_changed = plugin->output_changed; + + for (uint32_t s = 0; s < sample_count; s++) { + output[s] = input[s]; + } +} + +static void +runQuantiser_control(LV2_Handle instance, + uint32_t sample_count) +{ + Quantiser* plugin = (Quantiser*)instance; + + /* Range Min (float value) */ + const float min = *(plugin->min); + + /* Range Max (float value) */ + const float max = *(plugin->max); /* Match Range (float value) */ const float match_range = FABSF(*(plugin->match_range)); @@ -431,23 +469,3 @@ run(LV2_Handle instance, } plugin->last_found = last_found; } - -static const LV2_Descriptor descriptor = { - QUANTISER_URI, - instantiate, - connect_port, - NULL, - run, - NULL, - cleanup, - NULL -}; - -LV2_SYMBOL_EXPORT const LV2_Descriptor* -lv2_descriptor(uint32_t index) -{ - switch (index) { - case 0: return &descriptor; - default: return NULL; - } -} diff --git a/src/random.c b/src/random.c index 0981583..4a6f5b8 100644 --- a/src/random.c +++ b/src/random.c @@ -18,29 +18,24 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include <time.h> #include "math_func.h" #include "common.h" -#include "uris.h" #define RANDOM_FREQUENCY 0 #define RANDOM_SMOOTH 1 #define RANDOM_OUTPUT 2 typedef struct { - float* frequency; - float* smooth; - float* output; - float nyquist; - float inv_nyquist; - float phase; - float value1; - float value2; - uint32_t frequency_is_cv; - uint32_t smooth_is_cv; - URIs uris; + float* frequency; + float* smooth; + float* output; + float nyquist; + float inv_nyquist; + float phase; + float value1; + float value2; } Random; float inv_rand_max; @@ -71,33 +66,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Random* plugin = (Random*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case RANDOM_FREQUENCY: - plugin->frequency_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case RANDOM_SMOOTH: - plugin->smooth_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -116,9 +84,6 @@ instantiate(const LV2_Descriptor* descriptor, plugin->value1 = rand() * inv_rand_max - 1.0f; plugin->value2 = rand() * inv_rand_max - 1.0f; - plugin->frequency_is_cv = 0; - plugin->smooth_is_cv = 0; - return (LV2_Handle)plugin; } @@ -131,15 +96,15 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runRandom_fasa_oa(LV2_Handle instance, + uint32_t sample_count) { Random* plugin = (Random*)instance; - /* Frequency (Hz) (array of floats of length 1 or sample_count) */ + /* Frequency (Hz) (array of floats of length sample_count) */ const float* frequency = plugin->frequency; - /* Wave smoothness (array of floats of length 1 or sample_count) */ + /* Wave smoothness (array of floats of length sample_count) */ const float* smooth = plugin->smooth; /* Output (array of floats of length sample_count) */ @@ -152,16 +117,16 @@ run(LV2_Handle instance, float value1 = plugin->value1; float value2 = plugin->value2; + float freq; + float smth; + float interval; float result; for (uint32_t s = 0; s < sample_count; ++s) { - const float freq = f_clip(frequency[s * plugin->frequency_is_cv], - 0.0f, nyquist); + freq = f_clip(frequency[s], 0.0f, nyquist); - const float smth = f_clip(smooth[s * plugin->smooth_is_cv], - 0.0f, 1.0f); - - const float interval = (1.0f - smth) * 0.5f; + smth = f_clip(smooth[s], 0.0f, 1.0f); + interval = (1.0f - smth) * 0.5f; if (phase < interval) { result = 1.0f; @@ -191,25 +156,186 @@ run(LV2_Handle instance, plugin->value2 = value2; } -static const void* -extension_data(const char* uri) +static void +runRandom_fasc_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Random* plugin = (Random*)instance; + + /* Frequency (Hz) (array of floats of length sample_count) */ + const float* frequency = plugin->frequency; + + /* Wave smoothness (float value) */ + const float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f); + + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; + + /* Instance data */ + float nyquist = plugin->nyquist; + float inv_nyquist = plugin->inv_nyquist; + float phase = plugin->phase; + float value1 = plugin->value1; + float value2 = plugin->value2; + + float freq; + float interval = (1.0f - smooth) * 0.5f; + float result; + + for (uint32_t s = 0; s < sample_count; ++s) { + freq = f_clip(frequency[s], 0.0f, nyquist); + + if (phase < interval) { + result = 1.0f; + } else if (phase > (1.0f - interval)) { + result = -1.0f; + } else if (interval > 0.0f) { + result = COSF((phase - interval) / smooth * M_PI); + } else { + result = COSF(phase * M_PI); + } + + result *= (value2 - value1) * 0.5f; + result -= (value2 + value1) * 0.5f; + + output[s] = result; + + phase += freq * inv_nyquist; + if (phase > 1.0f) { + phase -= 1.0f; + value1 = value2; + value2 = (float)rand() * inv_rand_max - 1.0f; + } } - return NULL; + + plugin->phase = phase; + plugin->value1 = value1; + plugin->value2 = value2; +} + +static void +runRandom_fcsa_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Random* plugin = (Random*)instance; + + /* Frequency (Hz) (float value) */ + const float frequency = *(plugin->frequency); + + /* Wave smoothness (array of floats of length sample_count) */ + const float* smooth = plugin->smooth; + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + float nyquist = plugin->nyquist; + float inv_nyquist = plugin->inv_nyquist; + float phase = plugin->phase; + float value1 = plugin->value1; + float value2 = plugin->value2; + + float phase_scale = f_clip(frequency, 0.0f, nyquist) * inv_nyquist; + float smth; + float interval; + float result; + + for (uint32_t s = 0; s < sample_count; ++s) { + smth = f_clip(smooth[s], 0.0f, 1.0f); + interval = (1.0f - smth) * 0.5f; + + if (phase < interval) { + result = 1.0f; + } else if (phase > (1.0f - interval)) { + result = -1.0f; + } else if (interval > 0.0f) { + result = COSF((phase - interval) / smth * M_PI); + } else { + result = COSF(phase * M_PI); + } + + result *= (value2 - value1) * 0.5f; + result -= (value2 + value1) * 0.5f; + + output[s] = result; + + phase += phase_scale; + if (phase > 1.0f) { + phase -= 1.0f; + value1 = value2; + value2 = (float)rand() * inv_rand_max - 1.0f; + } + } + + plugin->phase = phase; + plugin->value1 = value1; + plugin->value2 = value2; +} + +static void +runRandom_fcsc_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Random* plugin = (Random*)instance; + + /* Frequency (Hz) (float value) */ + const float frequency = *(plugin->frequency); + + /* Wave smoothness (float value) */ + const float smooth = f_clip(*(plugin->smooth), 0.0f, 1.0f); + + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; + + /* Instance data */ + float nyquist = plugin->nyquist; + float inv_nyquist = plugin->inv_nyquist; + float phase = plugin->phase; + float value1 = plugin->value1; + float value2 = plugin->value2; + + float phase_scale = f_clip(frequency, 0.0f, nyquist) * inv_nyquist; + float interval = (1.0f - smooth) * 0.5f; + float result; + + for (uint32_t s = 0; s < sample_count; ++s) { + if (phase < interval) { + result = 1.0f; + } else if (phase > (1.0f - interval)) { + result = -1.0f; + } else if (interval > 0.0f) { + result = COSF((phase - interval) / smooth * M_PI); + } else { + result = COSF(phase * M_PI); + } + + result *= (value2 - value1) * 0.5f; + result -= (value2 + value1) * 0.5f; + + output[s] = result; + + phase += phase_scale; + if (phase > 1.0f) { + phase -= 1.0f; + value1 = value2; + value2 = (float)rand() * inv_rand_max - 1.0f; + } + } + + plugin->phase = phase; + plugin->value1 = value1; + plugin->value2 = value2; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/random", + "http://drobilla.net/plugins/blip/random", instantiate, connect_port, activate, - run, + runRandom_fcsc_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/ratio.c b/src/ratio.c index 170a5a5..4659f4f 100644 --- a/src/ratio.c +++ b/src/ratio.c @@ -18,24 +18,18 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "math_func.h" #include "common.h" -#include "uris.h" #define RATIO_NUMERATOR 0 #define RATIO_DENOMINATOR 1 #define RATIO_OUTPUT 2 typedef struct { - float* numerator; - float* denominator; - float* output; - uint32_t numerator_is_cv; - uint32_t denominator_is_cv; - uint32_t output_is_cv; - URIs uris; + float* numerator; + float* denominator; + float* output; } Ratio; static void @@ -64,51 +58,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Ratio* plugin = (Ratio*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case RATIO_NUMERATOR: - plugin->numerator_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case RATIO_DENOMINATOR: - plugin->denominator_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - plugin->output_is_cv = plugin->numerator_is_cv || plugin->denominator_is_cv; - return LV2_MORPH_SUCCESS; -} - -static LV2_URID -port_type(LV2_Handle instance, - uint32_t port, - LV2_Morph_Property*const* properties) -{ - Ratio* plugin = (Ratio*)instance; - - switch (port) { - case RATIO_OUTPUT: - return (plugin->output_is_cv - ? plugin->uris.lv2_CVPort - : plugin->uris.lv2_ControlPort); - default: - return 0; - } -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -117,18 +66,12 @@ instantiate(const LV2_Descriptor* descriptor, { Ratio* plugin = (Ratio*)malloc(sizeof(Ratio)); - plugin->numerator_is_cv = 0; - plugin->denominator_is_cv = 0; - plugin->output_is_cv = 0; - - map_uris(&plugin->uris, features); - return (LV2_Handle)plugin; } static void -run(LV2_Handle instance, - uint32_t sample_count) +runRatio_nada_oa(LV2_Handle instance, + uint32_t sample_count) { Ratio* plugin = (Ratio*)instance; @@ -141,13 +84,9 @@ run(LV2_Handle instance, /* Output (array of floats of length sample_count) */ float* output = plugin->output; - if (!plugin->output_is_cv) { /* TODO: Avoid this branch */ - sample_count = 1; - } - for (uint32_t s = 0; s < sample_count; ++s) { - const float n = numerator[s * plugin->numerator_is_cv]; - float d = denominator[s * plugin->denominator_is_cv]; + const float n = numerator[s]; + float d = denominator[s]; d = COPYSIGNF(f_max(FABSF(d), 1e-16f), d); @@ -155,25 +94,80 @@ run(LV2_Handle instance, } } -static const void* -extension_data(const char* uri) +static void +runRatio_nadc_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Ratio* plugin = (Ratio*)instance; + + /* Numerator (array of floats of length sample_count) */ + const float* numerator = plugin->numerator; + + /* Denominator (float value) */ + float denominator = *(plugin->denominator); + + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; + + denominator = COPYSIGNF(f_max(FABSF(denominator), 1e-16f), denominator); + + for (uint32_t s = 0; s < sample_count; ++s) { + output[s] = numerator[s] / denominator; + } +} + +static void +runRatio_ncda_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, port_type }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Ratio* plugin = (Ratio*)instance; + + /* Numerator (float value) */ + const float numerator = *(plugin->numerator); + + /* Denominator (array of floats of length sample_count) */ + const float* denominator = plugin->denominator; + + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; + + for (uint32_t s = 0; s < sample_count; ++s) { + float d = denominator[s]; + d = COPYSIGNF(f_max(FABSF(d), 1e-16f), d); + + output[s] = numerator / d; } - return NULL; +} + +static void +runRatio_ncdc_oc(LV2_Handle instance, + uint32_t sample_count) +{ + Ratio* plugin = (Ratio*)instance; + + /* Numerator (float value) */ + const float numerator = *(plugin->numerator); + + /* Denominator (float value) */ + float denominator = *(plugin->denominator); + + /* Output Frequency (pointer to float value) */ + float* output = plugin->output; + + denominator = COPYSIGNF(f_max(FABSF(denominator), 1e-16f), denominator); + + output[0] = numerator / denominator; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/ratio", + "http://drobilla.net/plugins/blip/ratio", instantiate, connect_port, NULL, - run, + runRatio_nada_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/sawtooth.c b/src/sawtooth.c index 0af927e..3c242e1 100644 --- a/src/sawtooth.c +++ b/src/sawtooth.c @@ -18,9 +18,7 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" #include "wavedata.h" #define SAWTOOTH_FREQUENCY 0 @@ -30,9 +28,7 @@ typedef struct { float* frequency; float* output; float phase; - uint32_t frequency_is_cv; Wavedata wdat; - URIs uris; } Sawtooth; static void @@ -52,23 +48,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Sawtooth* plugin = (Sawtooth*)instance; - if (type == plugin->uris.lv2_ControlPort) { - plugin->frequency_is_cv = 0; - } else if (type == plugin->uris.lv2_CVPort) { - plugin->frequency_is_cv = 1; - } else { - return LV2_MORPH_ERR_BAD_TYPE; - } - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -83,10 +62,6 @@ instantiate(const LV2_Descriptor* descriptor, return 0; } - plugin->frequency_is_cv = 0; - map_uris(&plugin->uris, features); - wavedata_get_table(&plugin->wdat, 440.0); - return (LV2_Handle)plugin; } @@ -108,12 +83,12 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runSawtooth_fa_oa(LV2_Handle instance, + uint32_t sample_count) { Sawtooth* plugin = (Sawtooth*)instance; - /* Frequency (array of float of length 1 or sample_count) */ + /* Frequency (array of float of length sample_count) */ const float* frequency = plugin->frequency; /* Output (pointer to float value) */ @@ -124,11 +99,8 @@ run(LV2_Handle instance, float phase = plugin->phase; for (uint32_t s = 0; s < sample_count; s++) { - const float freq = frequency[s * plugin->frequency_is_cv]; - if (freq != wdat->frequency) { - /* Frequency changed, look up table to play */ - wavedata_get_table(wdat, freq); - } + /* Lookup table to play */ + wavedata_get_table(wdat, frequency[s]); output[s] = wavedata_get_sample(wdat, phase); @@ -143,25 +115,47 @@ run(LV2_Handle instance, plugin->phase = phase; } -static const void* -extension_data(const char* uri) +static void +runSawtooth_fc_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Sawtooth* plugin = (Sawtooth*)instance; + + /* Frequency (float value) */ + const float frequency = *(plugin->frequency); + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + + wavedata_get_table(wdat, frequency); + + for (uint32_t s = 0; s < sample_count; s++) { + output[s] = wavedata_get_sample(wdat, phase); + + /* Update phase, wrapping if necessary */ + phase += wdat->frequency; + if (phase < 0.0f) { + phase += wdat->sample_rate; + } else if (phase > wdat->sample_rate) { + phase -= wdat->sample_rate; + } } - return NULL; + plugin->phase = phase; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/sawtooth", + "http://drobilla.net/plugins/blip/sawtooth", instantiate, connect_port, activate, - run, + runSawtooth_fc_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/sequencer.c b/src/sequencer.c index e77a58d..ef22a8a 100644 --- a/src/sequencer.c +++ b/src/sequencer.c @@ -113,8 +113,8 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runSequencer(LV2_Handle instance, + uint32_t sample_count) { Sequencer* plugin = (Sequencer*)instance; @@ -145,7 +145,7 @@ run(LV2_Handle instance, unsigned int step_index = plugin->step_index; unsigned int loop_index = LRINTF(loop_steps); - int rst = reset > 0.0f; + int rst = LRINTF(reset); int i; loop_index = loop_index == 0 ? 1 : loop_index; @@ -191,23 +191,3 @@ run(LV2_Handle instance, plugin->last_value = last_value; plugin->step_index = step_index; } - -static const LV2_Descriptor descriptor = { - SEQUENCER_URI, - instantiate, - connect_port, - activate, - run, - NULL, - cleanup, - NULL -}; - -LV2_SYMBOL_EXPORT const LV2_Descriptor* -lv2_descriptor(uint32_t index) -{ - switch (index) { - case 0: return &descriptor; - default: return NULL; - } -} diff --git a/src/square.c b/src/square.c index 3e7f78f..fb78859 100644 --- a/src/square.c +++ b/src/square.c @@ -18,9 +18,7 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" #include "wavedata.h" #define SQUARE_FREQUENCY 0 @@ -30,9 +28,7 @@ typedef struct { float* frequency; float* output; float phase; - uint32_t frequency_is_cv; Wavedata wdat; - URIs uris; } Square; static void @@ -52,23 +48,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Square* plugin = (Square*)instance; - if (type == plugin->uris.lv2_ControlPort) { - plugin->frequency_is_cv = 0; - } else if (type == plugin->uris.lv2_CVPort) { - plugin->frequency_is_cv = 1; - } else { - return LV2_MORPH_ERR_BAD_TYPE; - } - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -83,10 +62,6 @@ instantiate(const LV2_Descriptor* descriptor, return NULL; } - plugin->frequency_is_cv = 0; - map_uris(&plugin->uris, features); - wavedata_get_table(&plugin->wdat, 440.0); - return (LV2_Handle)plugin; } @@ -108,8 +83,8 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runSquare_fa_oa(LV2_Handle instance, + uint32_t sample_count) { Square* plugin = (Square*)instance; @@ -124,11 +99,8 @@ run(LV2_Handle instance, float phase = plugin->phase; for (uint32_t s = 0; s < sample_count; ++s) { - const float freq = frequency[s * plugin->frequency_is_cv]; - if (freq != wdat->frequency) { - /* Frequency changed, look up table to play */ - wavedata_get_table(wdat, freq); - } + /* Get table to play */ + wavedata_get_table(wdat, frequency[s]); /* Get interpolated sample */ output[s] = wavedata_get_sample(wdat, phase); @@ -144,25 +116,47 @@ run(LV2_Handle instance, plugin->phase = phase; } -static const void* -extension_data(const char* uri) +static void +runSquare_fc_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Square* plugin = (Square*)instance; + + /* Frequency (float value) */ + const float frequency = *(plugin->frequency); + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + + wavedata_get_table(wdat, frequency); + + for (uint32_t s = 0; s < sample_count; ++s) { + output[s] = wavedata_get_sample(wdat, phase); + + /* Update phase, wrapping if necessary */ + phase += wdat->frequency; + if (phase < 0.0f) { + phase += wdat->sample_rate; + } else if (phase > wdat->sample_rate) { + phase -= wdat->sample_rate; + } } - return NULL; + plugin->phase = phase; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/square", + "http://drobilla.net/plugins/blip/square", instantiate, connect_port, activate, - run, + runSquare_fc_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* @@ -18,22 +18,16 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" #define SUM_INPUT1 0 #define SUM_INPUT2 1 #define SUM_OUTPUT 2 typedef struct { - float* input1; - float* input2; - float* output; - uint32_t input1_is_cv; - uint32_t input2_is_cv; - uint32_t output_is_cv; - URIs uris; + float* input1; + float* input2; + float* output; } Sum; static void @@ -62,51 +56,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Sum* plugin = (Sum*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case SUM_INPUT1: - plugin->input1_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case SUM_INPUT2: - plugin->input2_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - plugin->output_is_cv = plugin->input1_is_cv || plugin->input2_is_cv; - return LV2_MORPH_SUCCESS; -} - -static LV2_URID -port_type(LV2_Handle instance, - uint32_t port, - LV2_Morph_Property*const* properties) -{ - Sum* plugin = (Sum*)instance; - - switch (port) { - case SUM_OUTPUT: - return (plugin->output_is_cv - ? plugin->uris.lv2_CVPort - : plugin->uris.lv2_ControlPort); - default: - return 0; - } -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -115,18 +64,12 @@ instantiate(const LV2_Descriptor* descriptor, { Sum* plugin = (Sum*)malloc(sizeof(Sum)); - plugin->input1_is_cv = 0; - plugin->input2_is_cv = 0; - plugin->output_is_cv = 0; - - map_uris(&plugin->uris, features); - return (LV2_Handle)plugin; } static void -run(LV2_Handle instance, - uint32_t sample_count) +runSum_iaia_oa(LV2_Handle instance, + uint32_t sample_count) { Sum* plugin = (Sum*)instance; @@ -139,36 +82,58 @@ run(LV2_Handle instance, /* Output (array of floats of length sample_count) */ float* output = plugin->output; - if (!plugin->output_is_cv) { /* TODO: Avoid this branch */ - sample_count = 1; + for (uint32_t s = 0; s < sample_count; ++s) { + output[s] = input1[s] + input2[s]; } +} + +static void +runSum_iaic_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Sum* plugin = (Sum*)instance; + + /* First Input (array of floats of length sample_count) */ + const float* input1 = plugin->input1; + + /* Second Input (float value) */ + const float input2 = *(plugin->input2); + + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; for (uint32_t s = 0; s < sample_count; ++s) { - const float in1 = input1[s * plugin->input1_is_cv]; - const float in2 = input2[s * plugin->input2_is_cv]; - output[s] = in1 + in2; + output[s] = input1[s] + input2; } } -static const void* -extension_data(const char* uri) +static void +runSum_icic_oc(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, port_type }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; - } - return NULL; + Sum* plugin = (Sum*)instance; + + /* First Input (float value) */ + const float input1 = *(plugin->input1); + + /* Second Input (float value) */ + const float input2 = *(plugin->input2); + + /* Output (pointer to float value) */ + float* output = plugin->output; + + output[0] = input1 + input2; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/sum", + "http://drobilla.net/plugins/blip/sum", instantiate, connect_port, NULL, - run, + runSum_iaia_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/sync_pulse.c b/src/sync_pulse.c index 14d9c8d..96f90c7 100644 --- a/src/sync_pulse.c +++ b/src/sync_pulse.c @@ -19,9 +19,7 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" #include "common.h" #define SYNCPULSE_FREQUENCY 0 @@ -30,15 +28,12 @@ #define SYNCPULSE_OUTPUT 3 typedef struct { - float* frequency; - float* pulsewidth; - float* gate; - float* output; - float srate; - float phase; - uint32_t frequency_is_cv; - uint32_t pulsewidth_is_cv; - URIs uris; + float* frequency; + float* pulsewidth; + float* gate; + float* output; + float srate; + float phase; } SyncPulse; static void @@ -70,33 +65,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - SyncPulse* plugin = (SyncPulse*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case SYNCPULSE_FREQUENCY: - plugin->frequency_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case SYNCPULSE_PULSEWIDTH: - plugin->pulsewidth_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -105,10 +73,7 @@ instantiate(const LV2_Descriptor* descriptor, { SyncPulse* plugin = (SyncPulse*)malloc(sizeof(SyncPulse)); - plugin->srate = (float)sample_rate; - plugin->frequency_is_cv = 0; - plugin->pulsewidth_is_cv = 0; - map_uris(&plugin->uris, features); + plugin->srate = (float)sample_rate; return (LV2_Handle)plugin; } @@ -122,8 +87,8 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runSyncPulse_fapaga_oa(LV2_Handle instance, + uint32_t sample_count) { SyncPulse* plugin = (SyncPulse*)instance; @@ -143,11 +108,13 @@ run(LV2_Handle instance, float phase = plugin->phase; float srate = plugin->srate; + float freq; + float pwidth; + for (uint32_t s = 0; s < sample_count; ++s) { if (gate[s] > 0.0f) { - const float freq = frequency[s * plugin->frequency_is_cv]; - const float pw = pulsewidth[s * plugin->pulsewidth_is_cv]; - const float pwidth = f_clip(pw, 0.0f, 1.0f) * srate; + freq = frequency[s]; + pwidth = f_clip(pulsewidth[s], 0.0f, 1.0f) * srate; if (phase < pwidth) { output[s] = 1.0f; @@ -170,25 +137,62 @@ run(LV2_Handle instance, plugin->phase = phase; } -static const void* -extension_data(const char* uri) +static void +runSyncPulse_fcpcga_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + SyncPulse* plugin = (SyncPulse*)instance; + + /* Frequency (float value) */ + const float frequency = *(plugin->frequency); + + /* Pulse Width (float value) */ + float pulsewidth = f_clip(*(plugin->pulsewidth), 0.0f, 1.0f); + + /* Gate (array of float of length sample_count) */ + const float* gate = plugin->gate; + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance Data */ + float phase = plugin->phase; + float srate = plugin->srate; + + pulsewidth *= srate; + + for (uint32_t s = 0; s < sample_count; ++s) { + if (gate[s] > 0.0f) { + if (phase < pulsewidth) { + output[s] = 1.0f; + } else { + output[s] = -1.0f; + } + + phase += frequency; + if (phase < 0.0f) { + phase += srate; + } else if (phase > srate) { + phase -= srate; + } + } else { + output[s] = 0.0f; + phase = 0.0f; + } } - return NULL; + + plugin->phase = phase; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/sync_pulse", + "http://drobilla.net/plugins/blip/sync_pulse", instantiate, connect_port, activate, - run, + runSyncPulse_fcpcga_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/sync_square.c b/src/sync_square.c index e954a46..51ceac5 100644 --- a/src/sync_square.c +++ b/src/sync_square.c @@ -19,23 +19,19 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" #define SYNCSQUARE_FREQUENCY 0 #define SYNCSQUARE_GATE 1 #define SYNCSQUARE_OUTPUT 2 typedef struct { - float* frequency; - float* gate; - float* output; - float srate; - float nyquist; - float phase; - uint32_t frequency_is_cv; - URIs uris; + float* frequency; + float* gate; + float* output; + float srate; + float nyquist; + float phase; } SyncSquare; static void @@ -64,31 +60,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - SyncSquare* plugin = (SyncSquare*)instance; - - switch (port) { - case SYNCSQUARE_FREQUENCY: - if (type == plugin->uris.lv2_ControlPort) { - plugin->frequency_is_cv = 0; - } else if (type == plugin->uris.lv2_CVPort) { - plugin->frequency_is_cv = 1; - } else { - return LV2_MORPH_ERR_BAD_TYPE; - } - return LV2_MORPH_SUCCESS; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -97,10 +68,8 @@ instantiate(const LV2_Descriptor* descriptor, { SyncSquare* plugin = (SyncSquare*)malloc(sizeof(SyncSquare)); - plugin->srate = (float)sample_rate; - plugin->nyquist = (float)(sample_rate / 2.0f); - plugin->frequency_is_cv = 0; - map_uris(&plugin->uris, features); + plugin->srate = (float)sample_rate; + plugin->nyquist = (float)(sample_rate / 2); return (LV2_Handle)plugin; } @@ -114,12 +83,12 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runSyncSquare_faga_oa(LV2_Handle instance, + uint32_t sample_count) { SyncSquare* plugin = (SyncSquare*)instance; - /* Frequency (array of float of length 1 or sample_count) */ + /* Frequency (array of float of length sample_count) */ const float* frequency = plugin->frequency; /* Gate (array of float of length sample_count) */ @@ -133,9 +102,11 @@ run(LV2_Handle instance, float srate = plugin->srate; float nyquist = plugin->nyquist; + float freq; + for (uint32_t s = 0; s < sample_count; ++s) { if (gate[s] > 0.0f) { - const float freq = frequency[s * plugin->frequency_is_cv]; + freq = frequency[s]; if (phase < nyquist) { output[s] = 1.0f; @@ -158,25 +129,58 @@ run(LV2_Handle instance, plugin->phase = phase; } -static const void* -extension_data(const char* uri) +static void +runSyncSquare_fcga_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + SyncSquare* plugin = (SyncSquare*)instance; + + /* Frequency (float value) */ + const float frequency = *(plugin->frequency); + + /* Gate (array of float of length sample_count) */ + const float* gate = plugin->gate; + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance Data */ + float phase = plugin->phase; + float srate = plugin->srate; + float nyquist = plugin->nyquist; + + for (uint32_t s = 0; s < sample_count; ++s) { + if (gate[s] > 0.0f) { + if (phase < nyquist) { + output[s] = 1.0f; + } else { + output[s] = -1.0f; + } + + phase += frequency; + if (phase < 0.0f) { + phase += srate; + } else if (phase > srate) { + phase -= srate; + } + } else { + output[s] = 0.0f; + phase = 0.0f; + } } - return NULL; + + plugin->phase = phase; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/sync_square", + "http://drobilla.net/plugins/blip/sync_square", instantiate, connect_port, activate, - run, + runSyncSquare_fcga_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/tracker.c b/src/tracker.c index 706c8a1..cb93bf8 100644 --- a/src/tracker.c +++ b/src/tracker.c @@ -18,10 +18,8 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" #include "common.h" -#include "uris.h" #define TRACKER_GATE 0 #define TRACKER_HATTACK 1 @@ -32,20 +30,15 @@ #define TRACKER_OUTPUT 6 typedef struct { - float* gate; - float* hattack; - float* hdecay; - float* lattack; - float* ldecay; - float* input; - float* output; - float coeff; - float last_value; - uint32_t hattack_is_cv; - uint32_t hdecay_is_cv; - uint32_t lattack_is_cv; - uint32_t ldecay_is_cv; - URIs uris; + float* gate; + float* hattack; + float* hdecay; + float* lattack; + float* ldecay; + float* input; + float* output; + float coeff; + float last_value; } Tracker; static void @@ -86,39 +79,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Tracker* plugin = (Tracker*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case TRACKER_HATTACK: - plugin->hattack_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case TRACKER_HDECAY: - plugin->hdecay_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case TRACKER_LATTACK: - plugin->lattack_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case TRACKER_LDECAY: - plugin->ldecay_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -129,13 +89,6 @@ instantiate(const LV2_Descriptor* descriptor, plugin->coeff = 2.0f * M_PI / (float)sample_rate; - plugin->hattack_is_cv = 0; - plugin->hdecay_is_cv = 0; - plugin->lattack_is_cv = 0; - plugin->ldecay_is_cv = 0; - - map_uris(&plugin->uris, features); - return (LV2_Handle)plugin; } @@ -148,24 +101,24 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runTracker_gaaadaia_oa(LV2_Handle instance, + uint32_t sample_count) { Tracker* plugin = (Tracker*)instance; /* Gate (array of floats of length sample_count) */ const float* gate = plugin->gate; - /* Gate High Attack Rate (array of floats of length 1 or sample_count) */ + /* Gate High Attack Rate (array of floats of length sample_count) */ const float* hattack = plugin->hattack; - /* Gate High Decay Rate (array of floats of length 1 or sample_count) */ + /* Gate High Decay Rate (array of floats of length sample_count) */ const float* hdecay = plugin->hdecay; - /* Gate Low Attack Rate (array of floats of length 1 or sample_count) */ + /* Gate Low Attack Rate (array of floats of length sample_count) */ const float* lattack = plugin->lattack; - /* Gate Low Decay Rate (array of floats of length 1 or sample_count) */ + /* Gate Low Decay Rate (array of floats of length sample_count) */ const float* ldecay = plugin->ldecay; /* Input (array of floats of length sample_count) */ @@ -178,18 +131,16 @@ run(LV2_Handle instance, float coeff = plugin->coeff; float last_value = plugin->last_value; + float rate; + float in; + for (uint32_t s = 0; s < sample_count; ++s) { - const float in = input[s]; - const float ha = hattack[s * plugin->hattack_is_cv]; - const float hd = hdecay[s * plugin->hdecay_is_cv]; - const float la = lattack[s * plugin->lattack_is_cv]; - const float ld = ldecay[s * plugin->ldecay_is_cv]; + in = input[s]; - float rate; if (gate[s] > 0.0f) { - rate = in > last_value ? ha : hd; + rate = in > last_value ? hattack[s] : hdecay[s]; } else { - rate = in > last_value ? la : ld; + rate = in > last_value ? lattack[s] : ldecay[s]; } rate = f_min(1.0f, rate * coeff); @@ -201,25 +152,71 @@ run(LV2_Handle instance, plugin->last_value = last_value; } -static const void* -extension_data(const char* uri) +static void +runTracker_gaacdcia_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Tracker* plugin = (Tracker*)instance; + + /* Gate (array of floats of length sample_count) */ + const float* gate = plugin->gate; + + /* Gate High Attack Rate (float value) */ + float hattack = *(plugin->hattack); + + /* Gate High Decay Rate (float value) */ + float hdecay = *(plugin->hdecay); + + /* Gate Low Attack Rate (float value) */ + float lattack = *(plugin->lattack); + + /* Gate Low Decay Rate (float value) */ + float ldecay = *(plugin->ldecay); + + /* Input (array of floats of length sample_count) */ + const float* input = plugin->input; + + /* Output (array of floats of length sample_count) */ + float* output = plugin->output; + + /* Instance Data */ + float coeff = plugin->coeff; + float last_value = plugin->last_value; + + float in; + float rate; + + hattack = f_min(1.0f, hattack * coeff); + hdecay = f_min(1.0f, hdecay * coeff); + lattack = f_min(1.0f, lattack * coeff); + ldecay = f_min(1.0f, ldecay * coeff); + + for (uint32_t s = 0; s < sample_count; ++s) { + in = input[s]; + + if (gate[s] > 0.0f) { + rate = in > last_value ? hattack : hdecay; + } else { + rate = in > last_value ? lattack : ldecay; + } + + last_value = last_value * (1.0f - rate) + in * rate; + + output[s] = last_value; } - return NULL; + + plugin->last_value = last_value; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/tracker", + "http://drobilla.net/plugins/blip/tracker", instantiate, connect_port, activate, - run, + runTracker_gaacdcia_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/triangle.c b/src/triangle.c index 8cb32a6..0a06f6c 100644 --- a/src/triangle.c +++ b/src/triangle.c @@ -18,9 +18,7 @@ */ #include <stdlib.h> -#include "lv2/lv2plug.in/ns/ext/morph/morph.h" #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "uris.h" #include "wavedata.h" #define TRIANGLE_FREQUENCY 0 @@ -34,10 +32,7 @@ typedef struct { float phase; float min_slope; float max_slope; - uint32_t frequency_is_cv; - uint32_t slope_is_cv; Wavedata wdat; - URIs uris; } Triangle; static void @@ -60,33 +55,6 @@ connect_port(LV2_Handle instance, } } -static LV2_Morph_Status -morph_port(LV2_Handle instance, - uint32_t port, - LV2_URID type, - const LV2_Morph_Property*const* properties) -{ - Triangle* plugin = (Triangle*)instance; - - if (type != plugin->uris.lv2_ControlPort && - type != plugin->uris.lv2_CVPort) { - return LV2_MORPH_ERR_BAD_TYPE; - } - - switch (port) { - case TRIANGLE_FREQUENCY: - plugin->frequency_is_cv = (type == plugin->uris.lv2_CVPort); - break; - case TRIANGLE_SLOPE: - plugin->slope_is_cv = (type == plugin->uris.lv2_CVPort); - break; - default: - return LV2_MORPH_ERR_BAD_PORT; - } - - return LV2_MORPH_SUCCESS; -} - static LV2_Handle instantiate(const LV2_Descriptor* descriptor, double sample_rate, @@ -104,12 +72,6 @@ instantiate(const LV2_Descriptor* descriptor, plugin->min_slope = 2.0f / plugin->wdat.sample_rate; plugin->max_slope = 1.0f - plugin->min_slope; - plugin->frequency_is_cv = 0; - plugin->slope_is_cv = 0; - - map_uris(&plugin->uris, features); - wavedata_get_table(&plugin->wdat, 440.0); - return (LV2_Handle)plugin; } @@ -131,46 +93,89 @@ activate(LV2_Handle instance) } static void -run(LV2_Handle instance, - uint32_t sample_count) +runTriangle_fasa_oa(LV2_Handle instance, + uint32_t sample_count) { Triangle* plugin = (Triangle*)instance; - /* Frequency (array of float of length 1 or sample_count) */ + /* Frequency (array of float of length sample_count) */ const float* frequency = plugin->frequency; - /* Slope (array of float of length 1 or sample_count) */ + /* Slope (array of float of length sample_count) */ const float* slope = plugin->slope; /* Output (pointer to float value) */ float* output = plugin->output; /* Instance data */ - Wavedata* wdat = &plugin->wdat; - float phase = plugin->phase; - const float min_slope = plugin->min_slope; - const float max_slope = plugin->max_slope; + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + float min_slope = plugin->min_slope; + float max_slope = plugin->max_slope; - float last_slope = slope[0]; - float slp = f_clip(last_slope, min_slope, max_slope); - float phase_shift = slp * wdat->sample_rate; - float scale = 1.0f / (8.0f * (slp - (slp * slp))); + float freq; + float slp; + float phase_shift; for (uint32_t s = 0; s < sample_count; ++s) { - const float freq = frequency[s * plugin->frequency_is_cv]; - if (freq != wdat->frequency) { - /* Frequency changed, look up table to play */ - wavedata_get_table(wdat, freq); - } + freq = frequency[s]; + slp = f_clip(slope[s], min_slope, max_slope); + phase_shift = slp * wdat->sample_rate; + + /* Lookup which table to use from frequency */ + wavedata_get_table(wdat, freq); - const float this_slope = slope[s * plugin->slope_is_cv]; - if (this_slope != last_slope) { - /* Slope changed, recalculate */ - last_slope = this_slope; - slp = f_clip(this_slope, min_slope, max_slope); - phase_shift = slp * wdat->sample_rate; - scale = 1.0f / (8.0f * (slp - (slp * slp))); + /* Get samples from parabola and phase shifted inverted parabola, + and scale to compensate */ + output[s] = (wavedata_get_sample(wdat, phase) + - wavedata_get_sample(wdat, phase + phase_shift)) + / (8.0f * (slp - (slp * slp))); + + /* Update phase, wrapping if necessary */ + phase += wdat->frequency; + if (phase < 0.0f) { + phase += wdat->sample_rate; + } else if (phase > wdat->sample_rate) { + phase -= wdat->sample_rate; } + } + plugin->phase = phase; +} + +static void +runTriangle_fasc_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Triangle* plugin = (Triangle*)instance; + + /* Frequency (array of float of length sample_count) */ + const float* frequency = plugin->frequency; + + /* Slope (float value) */ + float slope = *(plugin->slope); + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + float min_slope = plugin->min_slope; + float max_slope = plugin->max_slope; + + float freq; + float phase_shift; + float scale; + + slope = f_clip(slope, min_slope, max_slope); + scale = 1.0f / (8.0f * (slope - (slope * slope))); + phase_shift = slope * wdat->sample_rate; + + for (uint32_t s = 0; s < sample_count; ++s) { + freq = frequency[s]; + + /* Lookup which table to use from frequency */ + wavedata_get_table(wdat, freq); /* Get samples from parabola and phase shifted inverted parabola, and scale to compensate */ @@ -188,25 +193,109 @@ run(LV2_Handle instance, plugin->phase = phase; } -static const void* -extension_data(const char* uri) +static void +runTriangle_fcsa_oa(LV2_Handle instance, + uint32_t sample_count) { - static const LV2_Morph_Interface morph = { morph_port, NULL }; - if (!strcmp(uri, LV2_MORPH__interface)) { - return &morph; + Triangle* plugin = (Triangle*)instance; + + /* Frequency (float value) */ + const float frequency = *(plugin->frequency); + + /* Slope (array of float of length sample_count) */ + const float* slope = plugin->slope; + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + float min_slope = plugin->min_slope; + float max_slope = plugin->max_slope; + + float slp; + float phase_shift; + + wavedata_get_table(wdat, frequency); + + for (uint32_t s = 0; s < sample_count; ++s) { + slp = f_clip(slope[s], min_slope, max_slope); + phase_shift = slp * wdat->sample_rate; + + /* Get samples from parabola and phase shifted inverted parabola, + and scale to compensate */ + output[s] = (wavedata_get_sample(wdat, phase) + - wavedata_get_sample(wdat, phase + phase_shift)) + / (8.0f * (slp - (slp * slp))); + + /* Update phase, wrapping if necessary */ + phase += wdat->frequency; + if (phase < 0.0f) { + phase += wdat->sample_rate; + } else if (phase > wdat->sample_rate) { + phase -= wdat->sample_rate; + } } - return NULL; + plugin->phase = phase; +} + +static void +runTriangle_fcsc_oa(LV2_Handle instance, + uint32_t sample_count) +{ + Triangle* plugin = (Triangle*)instance; + + /* Frequency (float value) */ + const float frequency = *(plugin->frequency); + + /* Slope (float value) */ + float slope = *(plugin->slope); + + /* Output (pointer to float value) */ + float* output = plugin->output; + + /* Instance data */ + Wavedata* wdat = &plugin->wdat; + float phase = plugin->phase; + float min_slope = plugin->min_slope; + float max_slope = plugin->max_slope; + + float scale; + float phase_shift; + + slope = f_clip(slope, min_slope, max_slope); + scale = 1.0f / (8.0f * (slope - (slope * slope))); + phase_shift = slope * wdat->sample_rate; + + wavedata_get_table(wdat, frequency); + + for (uint32_t s = 0; s < sample_count; ++s) { + /* Get samples from parabola and phase shifted inverted parabola, + and scale to compensate */ + output[s] = (wavedata_get_sample(wdat, phase) + - wavedata_get_sample(wdat, phase + phase_shift)) * scale; + + /* Update phase, wrapping if necessary */ + phase += wdat->frequency; + if (phase < 0.0f) { + phase += wdat->sample_rate; + } else if (phase > wdat->sample_rate) { + phase -= wdat->sample_rate; + } + } + plugin->phase = phase; } static const LV2_Descriptor descriptor = { - "http://drobilla.net/plugins/blop/triangle", + "http://drobilla.net/plugins/blip/triangle", instantiate, connect_port, activate, - run, + runTriangle_fcsc_oa, NULL, cleanup, - extension_data, + NULL, }; LV2_SYMBOL_EXPORT const LV2_Descriptor* diff --git a/src/wavedata.c b/src/wavedata.c index 19dca0e..ff955a1 100644 --- a/src/wavedata.c +++ b/src/wavedata.c @@ -25,7 +25,7 @@ #include <stdlib.h> #include <stdio.h> #include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "blop_config.h" +#include "blip_config.h" #include "wavedata.h" int diff --git a/src/wdatutil.c b/src/wdatutil.c index ee1c88d..f7a277d 100644 --- a/src/wdatutil.c +++ b/src/wdatutil.c @@ -328,7 +328,7 @@ wavedata_write(Wavedata* w, fprintf(wdat_fp, "int\n"); fprintf( wdat_fp, - "blop_get_%s (Wavedata * w, double sample_rate, const char* bundle_path, const LV2_Feature* const* features)\n", + "blip_get_%s (Wavedata * w, double sample_rate, const char* bundle_path, const LV2_Feature* const* features)\n", data_name); fprintf(wdat_fp, "{\n"); fprintf(wdat_fp, "\tWavetable * t;\n"); |