summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/DeprecatedLoader.cpp3
-rw-r--r--src/libs/client/OSCClientReceiver.cpp2
-rw-r--r--src/libs/client/OSCEngineSender.cpp43
-rw-r--r--src/libs/client/OSCEngineSender.hpp18
-rw-r--r--src/libs/client/PluginModel.cpp13
5 files changed, 58 insertions, 21 deletions
diff --git a/src/libs/client/DeprecatedLoader.cpp b/src/libs/client/DeprecatedLoader.cpp
index f6c07ecd..9cff9422 100644
--- a/src/libs/client/DeprecatedLoader.cpp
+++ b/src/libs/client/DeprecatedLoader.cpp
@@ -258,7 +258,8 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
if (pm->name() == "default") {
list<ControlModel>::const_iterator i = pm->controls().begin();
for ( ; i != pm->controls().end(); ++i) {
- _engine->set_port_value(i->port_path(), i->value());
+ const float value = i->value();
+ _engine->set_port_value(i->port_path(), sizeof(float), &value);
}
} else {
cerr << "WARNING: Unknown preset: \"" << pm->name() << endl;
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 63bf5b69..d6ce3f81 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -39,7 +39,7 @@ OSCClientReceiver::OSCClientReceiver(int listen_port)
// _receiving_node_num_ports(0),
// _num_received_ports(0)
{
- start(false);
+ start(true);
}
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index 46181195..90f27676 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -16,9 +16,10 @@
*/
#include <iostream>
-#include "OSCEngineSender.hpp"
#include <raul/AtomLiblo.hpp>
-using std::cout; using std::cerr; using std::endl;
+#include "OSCEngineSender.hpp"
+
+using namespace std;
namespace Ingen {
namespace Client {
@@ -350,39 +351,61 @@ OSCEngineSender::disconnect_all(const string& node_path)
void
OSCEngineSender::set_port_value(const string& port_path,
- float val)
+ uint32_t data_size,
+ const void* data)
{
assert(_engine_addr);
+ assert(data_size == 4);
lo_send(_engine_addr, "/ingen/set_port_value", "isf",
next_id(),
port_path.c_str(),
- val);
+ *(float*)data);
}
void
OSCEngineSender::set_port_value(const string& port_path,
uint32_t voice,
- float val)
+ uint32_t data_size,
+ const void* data)
{
assert(_engine_addr);
+ assert(data_size == 4);
lo_send(_engine_addr, "/ingen/set_port_value", "isif",
next_id(),
port_path.c_str(),
voice,
- val);
+ *(float*)data);
+}
+
+
+void
+OSCEngineSender::set_port_value_immediate(const string& port_path,
+ uint32_t data_size,
+ const void* data)
+{
+ assert(_engine_addr);
+ assert(data_size == 4);
+ lo_send(_engine_addr, "/ingen/set_port_value_immediate", "isf",
+ next_id(),
+ port_path.c_str(),
+ *(float*)data);
}
void
-OSCEngineSender::set_port_value_queued(const string& port_path,
- float val)
+OSCEngineSender::set_port_value_immediate(const string& port_path,
+ uint32_t voice,
+ uint32_t data_size,
+ const void* data)
{
assert(_engine_addr);
- lo_send(_engine_addr, "/ingen/set_port_value_queued", "isf",
+ assert(data_size == 4);
+ lo_send(_engine_addr, "/ingen/set_port_value_immediate", "isif",
next_id(),
port_path.c_str(),
- val);
+ voice,
+ *(float*)data);
}
diff --git a/src/libs/client/OSCEngineSender.hpp b/src/libs/client/OSCEngineSender.hpp
index c3a9b46a..bdaf8337 100644
--- a/src/libs/client/OSCEngineSender.hpp
+++ b/src/libs/client/OSCEngineSender.hpp
@@ -112,14 +112,22 @@ public:
void disconnect_all(const string& node_path);
void set_port_value(const string& port_path,
- float val);
+ uint32_t data_size,
+ const void* data);
void set_port_value(const string& port_path,
uint32_t voice,
- float val);
-
- void set_port_value_queued(const string& port_path,
- float val);
+ uint32_t data_size,
+ const void* data);
+
+ void set_port_value_immediate(const string& port_path,
+ uint32_t data_size,
+ const void* data);
+
+ void set_port_value_immediate(const string& port_path,
+ uint32_t voice,
+ uint32_t data_size,
+ const void* data);
void set_program(const string& node_path,
uint32_t bank,
diff --git a/src/libs/client/PluginModel.cpp b/src/libs/client/PluginModel.cpp
index 442cbb43..6fb7e95a 100644
--- a/src/libs/client/PluginModel.cpp
+++ b/src/libs/client/PluginModel.cpp
@@ -55,11 +55,16 @@ PluginModel::default_node_name(SharedPtr<PatchModel> parent)
void
lv2_ui_write(LV2UI_Controller controller,
- uint32_t port,
- uint32_t buffer_size,
- const void* buffer)
+ uint32_t port,
+ uint32_t buffer_size,
+ const void* buffer)
{
- cerr << "********* LV2 UI WRITE" << endl;
+ cerr << "********* LV2 UI WRITE port " << port << ", size "
+ << buffer_size << endl;
+ for (uint32_t i=0; i < buffer_size; ++i) {
+ fprintf(stderr, "( %X )", *((uint8_t*)buffer + i));
+ }
+ fprintf(stderr, "\n");
}