diff options
Diffstat (limited to 'src/libs/client')
-rw-r--r-- | src/libs/client/Makefile.am | 1 | ||||
-rw-r--r-- | src/libs/client/OSCClientReceiver.cpp | 2 | ||||
-rw-r--r-- | src/libs/client/PluginModel.cpp | 24 |
3 files changed, 23 insertions, 4 deletions
diff --git a/src/libs/client/Makefile.am b/src/libs/client/Makefile.am index 2106c6db..ba8afd89 100644 --- a/src/libs/client/Makefile.am +++ b/src/libs/client/Makefile.am @@ -9,6 +9,7 @@ libingen_client_la_CXXFLAGS = \ -I$(top_srcdir)/slv2 \ -I$(top_srcdir)/raul \ -I$(top_srcdir)/ingen/src/common \ + -I$(top_srcdir)/lv2/extensions/osc \ -DPKGDATADIR=\"$(pkgdatadir)\" \ @LIBLO_CFLAGS@ \ @LXML2_CFLAGS@ @RASQAL_CFLAGS@ @RAPTOR_CFLAGS@ \ diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp index 1da99a96..bd0b5db9 100644 --- a/src/libs/client/OSCClientReceiver.cpp +++ b/src/libs/client/OSCClientReceiver.cpp @@ -35,7 +35,7 @@ OSCClientReceiver::OSCClientReceiver(int listen_port) _listen_port(listen_port), _st(NULL) { - start(false); + start(false); // true = dump, false = shutup } diff --git a/src/libs/client/PluginModel.cpp b/src/libs/client/PluginModel.cpp index 1947ddbd..e819d04b 100644 --- a/src/libs/client/PluginModel.cpp +++ b/src/libs/client/PluginModel.cpp @@ -17,6 +17,7 @@ #include <sstream> #include <raul/Path.hpp> +#include "lv2_osc_print.h" #include "PluginModel.hpp" #include "PatchModel.hpp" @@ -63,14 +64,31 @@ struct NodeController { void lv2_ui_write(LV2UI_Controller controller, - uint32_t port, + uint32_t port_index, uint32_t buffer_size, const void* buffer) { + /*cerr << "********* LV2 UI WRITE:" << endl; + lv2_osc_message_print((const LV2Message*)buffer); + + fprintf(stderr, "RAW:\n"); + for (uint32_t i=0; i < buffer_size; ++i) { + unsigned char byte = ((unsigned char*)buffer)[i]; + if (byte >= 32 && byte <= 126) + fprintf(stderr, "%c ", ((unsigned char*)buffer)[i]); + else + fprintf(stderr, "%2X ", ((unsigned char*)buffer)[i]); + } + + fprintf(stderr, "\n"); + */ + NodeController* nc = (NodeController*)controller; - nc->engine->set_port_value_immediate(nc->node->ports()[port]->path(), - "ingen:midi", buffer_size, buffer); + SharedPtr<PortModel> port = nc->node->ports()[port_index]; + + nc->engine->set_port_value_immediate(port->path(), + port->type().uri(), buffer_size, buffer); } |