summaryrefslogtreecommitdiffstats
path: root/examples/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'examples/plugins')
-rw-r--r--examples/plugins/Amp-onefile-slv2.lv2/Makefile10
-rw-r--r--examples/plugins/Amp-onefile-slv2.lv2/amp.c108
-rw-r--r--examples/plugins/Amp-onefile-slv2.lv2/manifest.ttl58
-rw-r--r--examples/plugins/Amp-slv2.lv2/Makefile10
-rw-r--r--examples/plugins/Amp-slv2.lv2/amp.c108
-rw-r--r--examples/plugins/Amp-slv2.lv2/amp.ttl57
-rw-r--r--examples/plugins/Amp-slv2.lv2/manifest.ttl11
-rw-r--r--examples/plugins/Makefile.am24
8 files changed, 0 insertions, 386 deletions
diff --git a/examples/plugins/Amp-onefile-slv2.lv2/Makefile b/examples/plugins/Amp-onefile-slv2.lv2/Makefile
deleted file mode 100644
index eb7dfe1..0000000
--- a/examples/plugins/Amp-onefile-slv2.lv2/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-CFLAGS = -Wall -I../../../include -fPIC -g -O0
-
-all: amp.so
-
-amp.so: amp.o
- $(LD) amp.o -o amp.so -shared
- rm amp.o
-
-clean:
- rm *.o amp.so
diff --git a/examples/plugins/Amp-onefile-slv2.lv2/amp.c b/examples/plugins/Amp-onefile-slv2.lv2/amp.c
deleted file mode 100644
index d52e8f4..0000000
--- a/examples/plugins/Amp-onefile-slv2.lv2/amp.c
+++ /dev/null
@@ -1,108 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-
-#include <math.h>
-
-#include "lv2.h"
-
-#ifdef WIN32
-#define SYMBOL_EXPORT __declspec(dllexport)
-#else
-#define SYMBOL_EXPORT
-#endif
-
-#define AMP_URI "http://codeson.net/plugins/amponefile"
-#define AMP_GAIN 0
-#define AMP_INPUT 1
-#define AMP_OUTPUT 2
-
-static LV2_Descriptor *ampDescriptor = NULL;
-
-typedef struct {
- float *gain;
- float *input;
- float *output;
-} Amp;
-
-
-static void
-cleanupAmp(LV2_Handle instance) {
- free(instance);
-}
-
-
-static void
-connectPortAmp(LV2_Handle instance, uint32_t port,
- void *data) {
- Amp *plugin = (Amp *)instance;
-
- switch (port) {
- case AMP_GAIN:
- plugin->gain = data;
- break;
- case AMP_INPUT:
- plugin->input = data;
- break;
- case AMP_OUTPUT:
- plugin->output = data;
- break;
- }
-}
-
-
-static LV2_Handle
-instantiateAmp(const LV2_Descriptor *descriptor,
- uint32_t s_rate, const char *path , const LV2_Host_Feature **features) {
- Amp *plugin_data = (Amp *)malloc(sizeof(Amp));
-
- return (LV2_Handle)plugin_data;
-}
-
-
-#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g) * 0.05f) : 0.0f)
-
-static void
-runAmp(LV2_Handle instance, uint32_t sample_count) {
- Amp *plugin_data = (Amp *)instance;
-
- const float gain = *(plugin_data->gain);
- const float * const input = plugin_data->input;
- float * const output = plugin_data->output;
-
- uint32_t pos;
- float coef = DB_CO(gain);
-
- for (pos = 0; pos < sample_count; pos++) {
- output[pos] = input[pos] * coef;
- }
-}
-
-
-static void
-init() {
- ampDescriptor =
- (LV2_Descriptor *)malloc(sizeof(LV2_Descriptor));
-
- ampDescriptor->URI = AMP_URI;
- ampDescriptor->activate = NULL;
- ampDescriptor->cleanup = cleanupAmp;
- ampDescriptor->connect_port = connectPortAmp;
- ampDescriptor->deactivate = NULL;
- ampDescriptor->instantiate = instantiateAmp;
- ampDescriptor->run = runAmp;
-}
-
-
-SYMBOL_EXPORT
-const LV2_Descriptor*
-lv2_descriptor(uint32_t index) {
- if (!ampDescriptor) init();
-
- switch (index) {
- case 0:
- return ampDescriptor;
- default:
- return NULL;
- }
-}
-
diff --git a/examples/plugins/Amp-onefile-slv2.lv2/manifest.ttl b/examples/plugins/Amp-onefile-slv2.lv2/manifest.ttl
deleted file mode 100644
index 8113dec..0000000
--- a/examples/plugins/Amp-onefile-slv2.lv2/manifest.ttl
+++ /dev/null
@@ -1,58 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix lv2: <http://lv2plug.in/ontology#> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-@prefix doap: <http://usefulinc.com/ns/doap#> .
-
-<http://codeson.net/plugins/amponefile> a lv2:Plugin ;
- lv2:binary <amp.so> ;
- a lv2:AmplifierPlugin ;
- doap:maintainer [
- foaf:name "Dave Robillard";
- foaf:homepage <http://codeson.net/> ;
- foaf:mbox <mailto:drobilla@connect.carleton.ca>
- ] ;
- doap:name "Simple Amplifier" ;
- doap:name "Einfacher Verst¿¿rker"@de ;
- doap:licence <http://usefulinc.com/doap/licenses/gpl> ;
-
- lv2:property lv2:hardRTCapable ;
-
- lv2:port [
- a lv2:ControlRateInputPort ;
- lv2:datatype lv2:float ;
- lv2:index 0 ;
- lv2:symbol "gain" ;
- lv2:name "Gain" ;
- lv2:name "Gewinn"@de ;
- lv2:default [ rdf:value 0.0 ] ;
- lv2:minimum [ rdf:value -90.0 ] ;
- lv2:maximum [ rdf:value 24.0 ] ;
- lv2:scalePoint [
- rdfs:label "+5" ;
- rdf:value 5.0
- ] , [
- rdfs:label "Unity" ;
- rdf:value 1.0
- ] , [
- rdfs:label "-5" ;
- rdf:value -5.0
- ] , [
- rdfs:label "-10" ;
- rdf:value -10.0
- ]
- ] , [
- a lv2:AudioRateInputPort ;
- lv2:datatype lv2:float ;
- lv2:index 1 ;
- lv2:symbol "in" ;
- lv2:name "Input"
- ] , [
- a lv2:AudioRateOutputPort ;
- lv2:datatype lv2:float ;
- lv2:index 2 ;
- lv2:symbol "out" ;
- lv2:name "Output"
- ]
-.
-
diff --git a/examples/plugins/Amp-slv2.lv2/Makefile b/examples/plugins/Amp-slv2.lv2/Makefile
deleted file mode 100644
index eb7dfe1..0000000
--- a/examples/plugins/Amp-slv2.lv2/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-CFLAGS = -Wall -I../../../include -fPIC -g -O0
-
-all: amp.so
-
-amp.so: amp.o
- $(LD) amp.o -o amp.so -shared
- rm amp.o
-
-clean:
- rm *.o amp.so
diff --git a/examples/plugins/Amp-slv2.lv2/amp.c b/examples/plugins/Amp-slv2.lv2/amp.c
deleted file mode 100644
index c9d6b73..0000000
--- a/examples/plugins/Amp-slv2.lv2/amp.c
+++ /dev/null
@@ -1,108 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-
-#include <math.h>
-
-#include "lv2.h"
-
-#ifdef WIN32
-#define SYMBOL_EXPORT __declspec(dllexport)
-#else
-#define SYMBOL_EXPORT
-#endif
-
-#define AMP_URI "http://codeson.net/plugins/amp"
-#define AMP_GAIN 0
-#define AMP_INPUT 1
-#define AMP_OUTPUT 2
-
-static LV2_Descriptor *ampDescriptor = NULL;
-
-typedef struct {
- float *gain;
- float *input;
- float *output;
-} Amp;
-
-
-static void
-cleanupAmp(LV2_Handle instance) {
- free(instance);
-}
-
-
-static void
-connectPortAmp(LV2_Handle instance, uint32_t port,
- void *data) {
- Amp *plugin = (Amp *)instance;
-
- switch (port) {
- case AMP_GAIN:
- plugin->gain = data;
- break;
- case AMP_INPUT:
- plugin->input = data;
- break;
- case AMP_OUTPUT:
- plugin->output = data;
- break;
- }
-}
-
-
-static LV2_Handle
-instantiateAmp(const LV2_Descriptor *descriptor,
- uint32_t s_rate, const char *path , const LV2_Host_Feature **features) {
- Amp *plugin_data = (Amp *)malloc(sizeof(Amp));
-
- return (LV2_Handle)plugin_data;
-}
-
-
-#define DB_CO(g) ((g) > -90.0f ? powf(10.0f, (g) * 0.05f) : 0.0f)
-
-static void
-runAmp(LV2_Handle instance, uint32_t sample_count) {
- Amp *plugin_data = (Amp *)instance;
-
- const float gain = *(plugin_data->gain);
- const float * const input = plugin_data->input;
- float * const output = plugin_data->output;
-
- uint32_t pos;
- float coef = DB_CO(gain);
-
- for (pos = 0; pos < sample_count; pos++) {
- output[pos] = input[pos] * coef;
- }
-}
-
-
-static void
-init() {
- ampDescriptor =
- (LV2_Descriptor *)malloc(sizeof(LV2_Descriptor));
-
- ampDescriptor->URI = AMP_URI;
- ampDescriptor->activate = NULL;
- ampDescriptor->cleanup = cleanupAmp;
- ampDescriptor->connect_port = connectPortAmp;
- ampDescriptor->deactivate = NULL;
- ampDescriptor->instantiate = instantiateAmp;
- ampDescriptor->run = runAmp;
-}
-
-
-SYMBOL_EXPORT
-const LV2_Descriptor*
-lv2_descriptor(uint32_t index) {
- if (!ampDescriptor) init();
-
- switch (index) {
- case 0:
- return ampDescriptor;
- default:
- return NULL;
- }
-}
-
diff --git a/examples/plugins/Amp-slv2.lv2/amp.ttl b/examples/plugins/Amp-slv2.lv2/amp.ttl
deleted file mode 100644
index abc5b33..0000000
--- a/examples/plugins/Amp-slv2.lv2/amp.ttl
+++ /dev/null
@@ -1,57 +0,0 @@
-@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-@prefix lv2: <http://lv2plug.in/ontology#> .
-@prefix foaf: <http://xmlns.com/foaf/0.1/> .
-@prefix doap: <http://usefulinc.com/ns/doap#> .
-
-<http://codeson.net/plugins/amp> a lv2:Plugin ;
- a lv2:AmplifierPlugin ;
- doap:maintainer [
- foaf:name "Dave Robillard";
- foaf:homepage <http://codeson.net/> ;
- foaf:mbox <mailto:drobilla@connect.carleton.ca>
- ] ;
- doap:name "Simple Amplifier" ;
- doap:name "Einfacher Verst¿¿rker"@de ;
- doap:licence <http://usefulinc.com/doap/licenses/gpl> ;
-
- lv2:property lv2:hardRTCapable ;
-
- lv2:port [
- a lv2:ControlRateInputPort ;
- lv2:datatype lv2:float ;
- lv2:index 0 ;
- lv2:symbol "gain" ;
- lv2:name "Gain" ;
- lv2:name "Gewinn"@de ;
- lv2:default [ rdf:value 0.0 ] ;
- lv2:minimum [ rdf:value -90.0 ] ;
- lv2:maximum [ rdf:value 24.0 ] ;
- lv2:scalePoint [
- rdfs:label "+5" ;
- rdf:value 5.0
- ] , [
- rdfs:label "Unity" ;
- rdf:value 1.0
- ] , [
- rdfs:label "-5" ;
- rdf:value -5.0
- ] , [
- rdfs:label "-10" ;
- rdf:value -10.0
- ]
- ] , [
- a lv2:AudioRateInputPort ;
- lv2:datatype lv2:float ;
- lv2:index 1 ;
- lv2:symbol "in" ;
- lv2:name "Input"
- ] , [
- a lv2:AudioRateOutputPort ;
- lv2:datatype lv2:float ;
- lv2:index 2 ;
- lv2:symbol "out" ;
- lv2:name "Output"
- ]
-.
-
diff --git a/examples/plugins/Amp-slv2.lv2/manifest.ttl b/examples/plugins/Amp-slv2.lv2/manifest.ttl
deleted file mode 100644
index 94456e6..0000000
--- a/examples/plugins/Amp-slv2.lv2/manifest.ttl
+++ /dev/null
@@ -1,11 +0,0 @@
-# LV2 Plugin Manifest
-# Lists where plugins' data files and shared objects reside.
-
-@prefix lv2: <http://lv2plug.in/ontology#> .
-@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
-
-<http://codeson.net/plugins/amp>
- lv2:binary <amp.so> ;
- rdfs:seeAlso <amp.ttl> .
-
-
diff --git a/examples/plugins/Makefile.am b/examples/plugins/Makefile.am
deleted file mode 100644
index 8044bc9..0000000
--- a/examples/plugins/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-#AM_CFLAGS = -I$(top_srcdir)/include
-#AM_LDFLAGS = -module -avoidversion -Wc,-nostartfiles
-#
-#plugindir = @umpdir@
-#
-#plugin_LTLIBRARIES = \
-# test_plugin.la
-#
-## Stolen from swh-plugins, makes stupid libtool versions go away
-#install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
-# mkdir -p @umpdir@
-# list='$(plugin_LTLIBRARIES)'; \
-# for file in $$list; do \
-# sofile=`basename $$file .la`.so; \
-# $(INSTALL_PROGRAM) .libs/$$sofile @umpdir@; \
-# done
-#
-#uninstall-pluginLTLIBRARIES: $(plugin_LTLIBRARIES)
-# list='$(plugin_LTLIBRARIES)'; \
-# for file in $$list; do \
-# sofile=`basename $$file .la`.so; \
-# rm -f @umpdir@/$$sofile; \
-# done
-#