aboutsummaryrefslogtreecommitdiff
path: root/bundle
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2015-09-26 09:46:30 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2015-09-26 09:46:30 +0200
commitea890a73e216be0275a42ad14bf53d7c8afb0584 (patch)
treee50c2a53fe366b716d5e3aecd44721e68b0a662e /bundle
parent200a9c004f2455cf9d6708dc547981ac153c3c95 (diff)
downloadsynthpod-ea890a73e216be0275a42ad14bf53d7c8afb0584.zip
synthpod-ea890a73e216be0275a42ad14bf53d7c8afb0584.tar.gz
synthpod-ea890a73e216be0275a42ad14bf53d7c8afb0584.tar.bz2
synthpod-ea890a73e216be0275a42ad14bf53d7c8afb0584.tar.xz
migrate systemport extension to data-only.
Diffstat (limited to 'bundle')
-rw-r--r--bundle/CMakeLists.txt13
-rw-r--r--bundle/synthpod_audio_sink.c98
-rw-r--r--bundle/synthpod_audio_source.c98
-rw-r--r--bundle/synthpod_bundle.c147
-rw-r--r--bundle/synthpod_bundle.h15
-rw-r--r--bundle/synthpod_bundle.ttl94
-rw-r--r--bundle/synthpod_cv_sink.c98
-rw-r--r--bundle/synthpod_cv_source.c98
-rw-r--r--bundle/synthpod_midi_sink.c98
-rw-r--r--bundle/synthpod_midi_source.c98
-rw-r--r--bundle/synthpod_osc_sink.c98
-rw-r--r--bundle/synthpod_osc_source.c98
-rw-r--r--bundle/synthpod_sink.c141
-rw-r--r--bundle/synthpod_source.c141
14 files changed, 218 insertions, 1117 deletions
diff --git a/bundle/CMakeLists.txt b/bundle/CMakeLists.txt
index d203824..227149f 100644
--- a/bundle/CMakeLists.txt
+++ b/bundle/CMakeLists.txt
@@ -1,5 +1,4 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-include_directories(${CMAKE_SOURCE_DIR}/system_port.lv2)
if(WIN32)
set(LIB_EXT ".dll")
@@ -11,17 +10,7 @@ endif()
# synthpod
add_library(synthpod_bundle.lv2 MODULE
- synthpod_bundle.c
- synthpod_sink.c
- synthpod_source.c
- synthpod_osc_sink.c
- synthpod_osc_source.c
- synthpod_cv_sink.c
- synthpod_cv_source.c
- synthpod_audio_sink.c
- synthpod_audio_source.c
- synthpod_midi_sink.c
- synthpod_midi_source.c)
+ synthpod_bundle.c)
set_target_properties(synthpod_bundle.lv2 PROPERTIES PREFIX "" OUTPUT_NAME "synthpod_bundle")
install(TARGETS synthpod_bundle.lv2 DESTINATION ${SYNTHPOD_BUNDLE_DIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/synthpod_bundle.ttl DESTINATION ${SYNTHPOD_BUNDLE_DIR})
diff --git a/bundle/synthpod_audio_sink.c b/bundle/synthpod_audio_sink.c
deleted file mode 100644
index 1a9fc87..0000000
--- a/bundle/synthpod_audio_sink.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- float *audio_in [4];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- if(port < 4)
- handle->audio_in[port] = (float *)data;
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- if(port < 4)
- return SYSTEM_PORT_AUDIO;
-
- return SYSTEM_PORT_NONE;
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_audio_sink = {
- .URI = SYNTHPOD_AUDIO_SINK_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_audio_source.c b/bundle/synthpod_audio_source.c
deleted file mode 100644
index a3daeb1..0000000
--- a/bundle/synthpod_audio_source.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- const float *audio_out [4];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- if(port < 4)
- handle->audio_out[port] = (const float *)data;
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- if(port < 4)
- return SYSTEM_PORT_AUDIO;
-
- return SYSTEM_PORT_NONE;
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_audio_source = {
- .URI = SYNTHPOD_AUDIO_SOURCE_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_bundle.c b/bundle/synthpod_bundle.c
index b7bdda6..e33f25f 100644
--- a/bundle/synthpod_bundle.c
+++ b/bundle/synthpod_bundle.c
@@ -19,6 +19,153 @@
#include <synthpod_bundle.h>
+typedef struct _plughandle_t plughandle_t;
+
+struct _plughandle_t {
+ int dummy;
+};
+
+static LV2_Handle
+instantiate(const LV2_Descriptor* descriptor, double rate,
+ const char *bundle_path, const LV2_Feature *const *features)
+{
+ plughandle_t *handle = calloc(1, sizeof(plughandle_t));
+ if(!handle)
+ return NULL;
+
+ return handle;
+}
+
+static void
+connect_port(LV2_Handle instance, uint32_t port, void *data)
+{
+ // nothing
+}
+
+static void
+run(LV2_Handle instance, uint32_t nsamples)
+{
+ // nothing
+}
+
+static void
+cleanup(LV2_Handle instance)
+{
+ plughandle_t *handle = instance;
+
+ free(handle);
+}
+
+static const LV2_Descriptor synthpod_audio_sink = {
+ .URI = SYNTHPOD_AUDIO_SINK_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_audio_source = {
+ .URI = SYNTHPOD_AUDIO_SOURCE_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_cv_sink = {
+ .URI = SYNTHPOD_CV_SINK_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_cv_source = {
+ .URI = SYNTHPOD_CV_SOURCE_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_midi_sink = {
+ .URI = SYNTHPOD_MIDI_SINK_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_midi_source = {
+ .URI = SYNTHPOD_MIDI_SOURCE_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_osc_sink = {
+ .URI = SYNTHPOD_OSC_SINK_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_osc_source = {
+ .URI = SYNTHPOD_OSC_SOURCE_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_sink = {
+ .URI = SYNTHPOD_SINK_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
+static const LV2_Descriptor synthpod_source = {
+ .URI = SYNTHPOD_SOURCE_URI,
+ .instantiate = instantiate,
+ .connect_port = connect_port,
+ .activate = NULL,
+ .run = run,
+ .deactivate = NULL,
+ .cleanup = cleanup,
+ .extension_data = NULL
+};
+
#ifdef _WIN32
__declspec(dllexport)
#else
diff --git a/bundle/synthpod_bundle.h b/bundle/synthpod_bundle.h
index 26608bf..5748dc0 100644
--- a/bundle/synthpod_bundle.h
+++ b/bundle/synthpod_bundle.h
@@ -39,19 +39,4 @@
#define SYNTHPOD_MIDI_SOURCE_URI SYNTHPOD_URI"#midi_source"
#define SYNTHPOD_MIDI_SINK_URI SYNTHPOD_URI"#midi_sink"
-extern const LV2_Descriptor synthpod_source;
-extern const LV2_Descriptor synthpod_sink;
-
-extern const LV2_Descriptor synthpod_osc_source;
-extern const LV2_Descriptor synthpod_osc_sink;
-
-extern const LV2_Descriptor synthpod_cv_source;
-extern const LV2_Descriptor synthpod_cv_sink;
-
-extern const LV2_Descriptor synthpod_audio_source;
-extern const LV2_Descriptor synthpod_audio_sink;
-
-extern const LV2_Descriptor synthpod_midi_source;
-extern const LV2_Descriptor synthpod_midi_sink;
-
#endif // _SYNTHPOD_LV2_H
diff --git a/bundle/synthpod_bundle.ttl b/bundle/synthpod_bundle.ttl
index 3c39dc7..20e5967 100644
--- a/bundle/synthpod_bundle.ttl
+++ b/bundle/synthpod_bundle.ttl
@@ -15,6 +15,7 @@
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix doap: <http://usefulinc.com/ns/doap#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix time: <http://lv2plug.in/ns/ext/time#> .
@@ -22,7 +23,6 @@
@prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> .
@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> .
@prefix patch: <http://lv2plug.in/ns/ext/patch#> .
-@prefix sys: <http://open-music-kontrollers.ch/lv2/system-port#> .
@prefix lic: <http://opensource.org/licenses/> .
@prefix omk: <http://open-music-kontrollers.ch/ventosus#> .
@@ -30,11 +30,29 @@
@prefix synthpod: <http://open-music-kontrollers.ch/lv2/synthpod#> .
# system-port definitions
-sys:interface
- a lv2:ExtensionData .
-sys:dynamicPorts
+synthpod:systemPorts
a lv2:Feature .
+synthpod:ControlPort
+ a rdfs:Class ;
+ rdfs:subClassOf lv2:Port .
+
+synthpod:AudioPort
+ a rdfs:Class ;
+ rdfs:subClassOf lv2:Port .
+
+synthpod:CVPort
+ a rdfs:Class ;
+ rdfs:subClassOf lv2:Port .
+
+synthpod:MIDIPort
+ a rdfs:Class ;
+ rdfs:subClassOf lv2:Port .
+
+synthpod:OSCPort
+ a rdfs:Class ;
+ rdfs:subClassOf lv2:Port .
+
# Maintainer
omk:me
a foaf:Person ;
@@ -68,13 +86,13 @@ synthpod:sink
doap:name "Synthpod System Sink" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
# event in
a lv2:InputPort ,
+ synthpod:MIDIPort ,
atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports midi:MidiEvent ;
@@ -89,6 +107,7 @@ synthpod:sink
] , [
# audio in 1
a lv2:InputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 1 ;
lv2:symbol "audio_sink_1" ;
@@ -98,6 +117,7 @@ synthpod:sink
] , [
# audio in 2
a lv2:InputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 2 ;
lv2:symbol "audio_sink_2" ;
@@ -107,6 +127,7 @@ synthpod:sink
] , [
# control in
a lv2:InputPort ,
+ synthpod:ControlPort ,
lv2:ControlPort ;
lv2:index 3 ;
lv2:symbol "control_sink_1" ;
@@ -114,6 +135,7 @@ synthpod:sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:ControlPort ,
lv2:ControlPort ;
lv2:index 4 ;
lv2:symbol "control_sink_2" ;
@@ -121,6 +143,7 @@ synthpod:sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:ControlPort ,
lv2:ControlPort ;
lv2:index 5 ;
lv2:symbol "control_sink_3" ;
@@ -128,6 +151,7 @@ synthpod:sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:ControlPort ,
lv2:ControlPort ;
lv2:index 6 ;
lv2:symbol "control_sink_4" ;
@@ -142,13 +166,13 @@ synthpod:source
doap:name "Synthpod System Source" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
# event in
a lv2:OutputPort ,
+ synthpod:MIDIPort ,
atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports midi:MidiEvent ;
@@ -163,6 +187,7 @@ synthpod:source
] , [
# audio in 1
a lv2:OutputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 1 ;
lv2:symbol "audio_source_1" ;
@@ -172,6 +197,7 @@ synthpod:source
] , [
# audio in 2
a lv2:OutputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 2 ;
lv2:symbol "audio_source_2" ;
@@ -181,6 +207,7 @@ synthpod:source
] , [
# control in
a lv2:OutputPort ,
+ synthpod:ControlPort ,
lv2:ControlPort ;
lv2:index 3 ;
lv2:symbol "control_source_1" ;
@@ -188,6 +215,7 @@ synthpod:source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:ControlPort ,
lv2:ControlPort ;
lv2:index 4 ;
lv2:symbol "control_source_2" ;
@@ -195,6 +223,7 @@ synthpod:source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:ControlPort ,
lv2:ControlPort ;
lv2:index 5 ;
lv2:symbol "control_source_3" ;
@@ -202,6 +231,7 @@ synthpod:source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:ControlPort ,
lv2:ControlPort ;
lv2:index 6 ;
lv2:symbol "control_source_4" ;
@@ -216,12 +246,12 @@ synthpod:midi_sink
doap:name "Synthpod MIDI Sink" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength, sys:dynamicPorts ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
a lv2:InputPort ,
+ synthpod:MIDIPort ,
atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports midi:MidiEvent ;
@@ -231,6 +261,7 @@ synthpod:midi_sink
lv2:designation lv2:control ;
pg:group synthpod:group_sink ;
] .
+
# MIDI Source Plugin
synthpod:midi_source
a lv2:Plugin ,
@@ -238,12 +269,12 @@ synthpod:midi_source
doap:name "Synthpod MIDI Source" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength, sys:dynamicPorts ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
a lv2:OutputPort ,
+ synthpod:MIDIPort ,
atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports midi:MidiEvent ;
@@ -261,12 +292,12 @@ synthpod:osc_sink
doap:name "Synthpod OSC Sink" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength, sys:dynamicPorts ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
a lv2:InputPort ,
+ synthpod:OSCPort ,
atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports atom:Object ;
@@ -276,6 +307,7 @@ synthpod:osc_sink
lv2:designation lv2:control ;
pg:group synthpod:group_sink ;
] .
+
# OSC Source Plugin
synthpod:osc_source
a lv2:Plugin ,
@@ -283,12 +315,12 @@ synthpod:osc_source
doap:name "Synthpod OSC Source" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength, sys:dynamicPorts ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
a lv2:OutputPort ,
+ synthpod:OSCPort ,
atom:AtomPort ;
atom:bufferType atom:Sequence ;
atom:supports atom:Object ;
@@ -306,12 +338,12 @@ synthpod:cv_sink
doap:name "Synthpod CV Sink" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength, sys:dynamicPorts ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
a lv2:InputPort ,
+ synthpod:CVPort ,
lv2:CVPort ;
lv2:index 0 ;
lv2:symbol "cv_sink_1" ;
@@ -319,6 +351,7 @@ synthpod:cv_sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:CVPort ,
lv2:CVPort ;
lv2:index 1 ;
lv2:symbol "cv_sink_2" ;
@@ -326,6 +359,7 @@ synthpod:cv_sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:CVPort ,
lv2:CVPort ;
lv2:index 2 ;
lv2:symbol "cv_sink_3" ;
@@ -333,12 +367,14 @@ synthpod:cv_sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:CVPort ,
lv2:CVPort ;
lv2:index 3 ;
lv2:symbol "cv_sink_4" ;
lv2:name "CV Sink 4" ;
pg:group synthpod:group_sink ;
] .
+
# CV Source Plugin
synthpod:cv_source
a lv2:Plugin ,
@@ -346,12 +382,12 @@ synthpod:cv_source
doap:name "Synthpod CV Source" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength, sys:dynamicPorts ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
a lv2:OutputPort ,
+ synthpod:CVPort ,
lv2:CVPort ;
lv2:index 0 ;
lv2:symbol "cv_source_1" ;
@@ -359,6 +395,7 @@ synthpod:cv_source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:CVPort ,
lv2:CVPort ;
lv2:index 1 ;
lv2:symbol "cv_source_2" ;
@@ -366,6 +403,7 @@ synthpod:cv_source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:CVPort ,
lv2:CVPort ;
lv2:index 2 ;
lv2:symbol "cv_source_3" ;
@@ -373,6 +411,7 @@ synthpod:cv_source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:CVPort ,
lv2:CVPort ;
lv2:index 3 ;
lv2:symbol "cv_source_4" ;
@@ -387,12 +426,12 @@ synthpod:audio_sink
doap:name "Synthpod Audio Sink" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength, sys:dynamicPorts ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
a lv2:InputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 0 ;
lv2:symbol "audio_sink_1" ;
@@ -400,6 +439,7 @@ synthpod:audio_sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 1 ;
lv2:symbol "audio_sink_2" ;
@@ -407,6 +447,7 @@ synthpod:audio_sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 2 ;
lv2:symbol "audio_sink_3" ;
@@ -414,12 +455,14 @@ synthpod:audio_sink
pg:group synthpod:group_sink ;
] , [
a lv2:InputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 3 ;
lv2:symbol "audio_sink_4" ;
lv2:name "Audio Sink 4" ;
pg:group synthpod:group_sink ;
] .
+
# AudioSource Plugin
synthpod:audio_source
a lv2:Plugin ,
@@ -427,12 +470,12 @@ synthpod:audio_source
doap:name "Synthpod Audio Source" ;
doap:license lic:Artistic-2.0 ;
lv2:project proj:synthpod ;
- lv2:requiredFeature bufsz:boundedBlockLength, sys:dynamicPorts ;
+ lv2:requiredFeature bufsz:boundedBlockLength, synthpod:systemPorts ;
lv2:optionalFeature lv2:isLive, lv2:hardRTCapable ;
- lv2:extensionData sys:interface ;
lv2:port [
a lv2:OutputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 0 ;
lv2:symbol "audio_source_1" ;
@@ -440,6 +483,7 @@ synthpod:audio_source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 1 ;
lv2:symbol "audio_source_2" ;
@@ -447,6 +491,7 @@ synthpod:audio_source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 2 ;
lv2:symbol "audio_source_3" ;
@@ -454,6 +499,7 @@ synthpod:audio_source
pg:group synthpod:group_source ;
] , [
a lv2:OutputPort ,
+ synthpod:AudioPort ,
lv2:AudioPort ;
lv2:index 3 ;
lv2:symbol "audio_source_4" ;
diff --git a/bundle/synthpod_cv_sink.c b/bundle/synthpod_cv_sink.c
deleted file mode 100644
index ad5b0c6..0000000
--- a/bundle/synthpod_cv_sink.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- float *cv_in [4];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- if(port < 4)
- handle->cv_in[port] = (float *)data;
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- if(port < 4)
- return SYSTEM_PORT_CV;
-
- return SYSTEM_PORT_NONE;
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_cv_sink = {
- .URI = SYNTHPOD_CV_SINK_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_cv_source.c b/bundle/synthpod_cv_source.c
deleted file mode 100644
index 7360ad3..0000000
--- a/bundle/synthpod_cv_source.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- const float *cv_out [4];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- if(port < 4)
- handle->cv_out[port] = (const float *)data;
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- if(port < 4)
- return SYSTEM_PORT_CV;
-
- return SYSTEM_PORT_NONE;
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_cv_source = {
- .URI = SYNTHPOD_CV_SOURCE_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_midi_sink.c b/bundle/synthpod_midi_sink.c
deleted file mode 100644
index d85a072..0000000
--- a/bundle/synthpod_midi_sink.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- LV2_Atom_Sequence *event_in [1];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- if(port < 1)
- handle->event_in[port] = (LV2_Atom_Sequence *)data;
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- if(port < 1)
- return SYSTEM_PORT_MIDI;
-
- return SYSTEM_PORT_NONE;
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_midi_sink = {
- .URI = SYNTHPOD_MIDI_SINK_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_midi_source.c b/bundle/synthpod_midi_source.c
deleted file mode 100644
index b4ead45..0000000
--- a/bundle/synthpod_midi_source.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- const LV2_Atom_Sequence *event_out [1];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- if(port < 1)
- handle->event_out[port] = (const LV2_Atom_Sequence *)data;
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- if(port < 1)
- return SYSTEM_PORT_MIDI;
-
- return SYSTEM_PORT_NONE;
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_midi_source = {
- .URI = SYNTHPOD_MIDI_SOURCE_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_osc_sink.c b/bundle/synthpod_osc_sink.c
deleted file mode 100644
index 80b38c3..0000000
--- a/bundle/synthpod_osc_sink.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- LV2_Atom_Sequence *event_in [1];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- if(port < 1)
- handle->event_in[port] = (LV2_Atom_Sequence *)data;
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- if(port < 1)
- return SYSTEM_PORT_OSC;
-
- return SYSTEM_PORT_NONE;
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_osc_sink = {
- .URI = SYNTHPOD_OSC_SINK_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_osc_source.c b/bundle/synthpod_osc_source.c
deleted file mode 100644
index 7cfea15..0000000
--- a/bundle/synthpod_osc_source.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- const LV2_Atom_Sequence *event_out [1];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- if(port < 1)
- handle->event_out[port] = (const LV2_Atom_Sequence *)data;
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- if(port < 1)
- return SYSTEM_PORT_OSC;
-
- return SYSTEM_PORT_NONE;
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_osc_source = {
- .URI = SYNTHPOD_OSC_SOURCE_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_sink.c b/bundle/synthpod_sink.c
deleted file mode 100644
index 9766674..0000000
--- a/bundle/synthpod_sink.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- LV2_Atom_Sequence *event_in;
- float *audio_in[2];
- float *input[4];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- switch(port)
- {
- case 0:
- handle->event_in = (LV2_Atom_Sequence *)data;
- break;
-
- case 1:
- handle->audio_in[0] = (float *)data;
- break;
- case 2:
- handle->audio_in[1] = (float *)data;
- break;
-
- case 3:
- handle->input[0] = (float *)data;
- break;
- case 4:
- handle->input[1] = (float *)data;
- break;
- case 5:
- handle->input[2] = (float *)data;
- break;
- case 6:
- handle->input[3] = (float *)data;
- break;
-
- default:
- break;
- }
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- switch(port)
- {
- case 0:
- return SYSTEM_PORT_MIDI;
-
- case 1:
- case 2:
- return SYSTEM_PORT_AUDIO;
-
- case 3:
- case 4:
- case 5:
- case 6:
- return SYSTEM_PORT_CONTROL;
-
- default:
- return SYSTEM_PORT_NONE;
- }
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_sink = {
- .URI = SYNTHPOD_SINK_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};
diff --git a/bundle/synthpod_source.c b/bundle/synthpod_source.c
deleted file mode 100644
index b9a6db5..0000000
--- a/bundle/synthpod_source.c
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 2015 Hanspeter Portner (dev@open-music-kontrollers.ch)
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the Artistic License 2.0 as published by
- * The Perl Foundation.
- *
- * This source 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
- * Artistic License 2.0 for more details.
- *
- * You should have received a copy of the Artistic License 2.0
- * along the source as a COPYING file. If not, obtain it from
- * http://www.perlfoundation.org/artistic_license_2_0.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <synthpod_bundle.h>
-#include <system_port.h>
-
-#include <lv2/lv2plug.in/ns/ext/atom/atom.h>
-
-typedef struct _plughandle_t plughandle_t;
-
-struct _plughandle_t {
- const LV2_Atom_Sequence *event_out;
- const float *audio_out[2];
- const float *output[4];
-};
-
-static LV2_Handle
-instantiate(const LV2_Descriptor* descriptor, double rate,
- const char *bundle_path, const LV2_Feature *const *features)
-{
- plughandle_t *handle = calloc(1, sizeof(plughandle_t));
- if(!handle)
- return NULL;
-
- return handle;
-}
-
-static void
-connect_port(LV2_Handle instance, uint32_t port, void *data)
-{
- plughandle_t *handle = instance;
-
- switch(port)
- {
- case 0:
- handle->event_out = (const LV2_Atom_Sequence *)data;
- break;
-
- case 1:
- handle->audio_out[0] = (const float *)data;
- break;
- case 2:
- handle->audio_out[1] = (const float *)data;
- break;
-
- case 3:
- handle->output[0] = (const float *)data;
- break;
- case 4:
- handle->output[1] = (const float *)data;
- break;
- case 5:
- handle->output[2] = (const float *)data;
- break;
- case 6:
- handle->output[3] = (const float *)data;
- break;
-
- default:
- break;
- }
-}
-
-static System_Port_Type
-query(LV2_Handle instance, uint32_t port)
-{
- switch(port)
- {
- case 0:
- return SYSTEM_PORT_MIDI;
-
- case 1:
- case 2:
- return SYSTEM_PORT_AUDIO;
-
- case 3:
- case 4:
- case 5:
- case 6:
- return SYSTEM_PORT_CONTROL;
-
- default:
- return SYSTEM_PORT_NONE;
- }
-}
-
-static void
-run(LV2_Handle instance, uint32_t nsamples)
-{
- // nothing
-}
-
-static void
-cleanup(LV2_Handle instance)
-{
- plughandle_t *handle = instance;
-
- free(handle);
-}
-
-static const System_Port_Interface sys = {
- .query = query
-};
-
-static const void*
-extension_data(const char* uri)
-{
- if(!strcmp(uri, SYSTEM_PORT__interface))
- return &sys;
-
- return NULL;
-}
-
-const LV2_Descriptor synthpod_source = {
- .URI = SYNTHPOD_SOURCE_URI,
- .instantiate = instantiate,
- .connect_port = connect_port,
- .activate = NULL,
- .run = run,
- .deactivate = NULL,
- .cleanup = cleanup,
- .extension_data = extension_data
-};