aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt10
-rw-r--r--atom_inspector.c9
-rw-r--r--sherlock.ttl15
3 files changed, 30 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ccb15f..bd8ff03 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,13 @@ include_directories(${PROJECT_SOURCE_DIR}/libosc)
include_directories(${PROJECT_SOURCE_DIR}/eo_ui.lv2)
set(DEST lib/lv2/sherlock.lv2)
-set(LIB_EXT ".so")
+if(WIN32)
+ set(LIB_EXT ".dll")
+elseif(APPLE)
+ set(LIB_EXT ".so")
+else()
+ set(LIB_EXT ".so")
+endif()
find_package(PkgConfig) # ${PKG_CONFIG_FOUND}
@@ -23,7 +29,7 @@ if((${ELM_VERSION} VERSION_EQUAL "1.13.0") OR (${ELM_VERSION} VERSION_GREATER "1
add_definitions("-DELM_HAS_FAKE")
endif()
-option(BUILD_X11_WRAPPER ON)
+option(BUILD_X11_WRAPPER "Build X11 UI wrapper" ON)
if(${BUILD_X11_WRAPPER})
set(X11_UI_WRAP "")
else()
diff --git a/atom_inspector.c b/atom_inspector.c
index 6430ec1..2bf358a 100644
--- a/atom_inspector.c
+++ b/atom_inspector.c
@@ -25,6 +25,7 @@ typedef struct _handle_t handle_t;
struct _handle_t {
LV2_URID_Map *map;
const LV2_Atom_Sequence *control_in;
+ LV2_Atom_Sequence *control_out;
};
static LV2_Handle
@@ -60,6 +61,9 @@ connect_port(LV2_Handle instance, uint32_t port, void *data)
case 0:
handle->control_in = (const LV2_Atom_Sequence *)data;
break;
+ case 1:
+ handle->control_out = (LV2_Atom_Sequence *)data;
+ break;
default:
break;
}
@@ -76,7 +80,10 @@ static void
run(LV2_Handle instance, uint32_t nsamples)
{
handle_t *handle = (handle_t *)instance;
- //nothing
+
+ // copy whole sequence
+ size_t size = sizeof(LV2_Atom) + handle->control_in->atom.size;
+ memcpy(handle->control_out, handle->control_in, size);
}
static void
diff --git a/sherlock.ttl b/sherlock.ttl
index b65fe2d..1eac211 100644
--- a/sherlock.ttl
+++ b/sherlock.ttl
@@ -94,8 +94,21 @@ sherlock:atom_inspector
a lv2:InputPort ,
atom:AtomPort ;
atom:bufferType atom:Sequence ;
- lv2:designation lv2:control ;
+ atom:supports midi:MidiEvent ;
+ atom:supports atom:Object ;
lv2:index 0 ;
lv2:symbol "control_in" ;
lv2:name "Control In" ;
+ lv2:designation lv2:control ;
+ ] , [
+ # output event port
+ a lv2:OutputPort ,
+ atom:AtomPort ;
+ atom:bufferType atom:Sequence ;
+ atom:supports midi:MidiEvent ;
+ atom:supports atom:Object ;
+ lv2:index 1 ;
+ lv2:symbol "control_out" ;
+ lv2:name "Control Out" ;
+ lv2:designation lv2:control ;
] .