summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-09 03:45:24 +0000
committerDavid Robillard <d@drobilla.net>2007-10-09 03:45:24 +0000
commitb98fd4bc7b8548cc2be538a91ce799fabbd3054f (patch)
tree1b48099e550d83eb138d886f3bb643a90071f5f0 /src/libs/client
parent531cd8958765315a5340ba94487d655023acd758 (diff)
downloadingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.tar.gz
ingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.tar.bz2
ingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.zip
Fix OSC patching.
Add OSC "bang" LV2 plugin, with GUI (just a button). Make OSC metronome suck slightly less. git-svn-id: http://svn.drobilla.net/lad/ingen@857 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/Makefile.am1
-rw-r--r--src/libs/client/OSCClientReceiver.cpp2
-rw-r--r--src/libs/client/PluginModel.cpp24
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);
}