summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-19 02:46:47 +0000
committerDavid Robillard <d@drobilla.net>2007-09-19 02:46:47 +0000
commit49d6f5b2cc495052d6c5ddbb0629e178c9a2cc14 (patch)
tree4b56e8fe9f01b42e269e5423347a7cc0664599ad /src/libs/client
parentcbc7847a12e57176c5bafa9baa007de6865745c7 (diff)
downloadingen-49d6f5b2cc495052d6c5ddbb0629e178c9a2cc14.tar.gz
ingen-49d6f5b2cc495052d6c5ddbb0629e178c9a2cc14.tar.bz2
ingen-49d6f5b2cc495052d6c5ddbb0629e178c9a2cc14.zip
More work on dynamic polyphony.
git-svn-id: http://svn.drobilla.net/lad/ingen@721 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/OSCClientReceiver.cpp1
-rw-r--r--src/libs/client/OSCEngineSender.cpp27
-rw-r--r--src/libs/client/OSCEngineSender.hpp4
3 files changed, 32 insertions, 0 deletions
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 0479cea9..de51ad22 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -32,6 +32,7 @@ namespace Client {
OSCClientReceiver::OSCClientReceiver(int listen_port)
: ClientInterface("localhost"),
+ _listen_port(listen_port),
_st(NULL)//,
// _receiving_node(false),
// _receiving_node_model(NULL),
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index 76b094a0..89939b6b 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -253,6 +253,33 @@ OSCEngineSender::clear_patch(const string& patch_path)
patch_path.c_str());
}
+
+void
+OSCEngineSender::set_polyphony(const string& patch_path, uint32_t poly)
+{
+ assert(_engine_addr);
+ lo_send(_engine_addr, "/ingen/set_polyphony", "isi",
+ next_id(),
+ patch_path.c_str(),
+ poly);
+}
+
+
+void
+OSCEngineSender::set_polyphonic(const string& path, bool poly)
+{
+ assert(_engine_addr);
+ if (poly) {
+ lo_send(_engine_addr, "/ingen/set_polyphony", "isT",
+ next_id(),
+ path.c_str());
+ } else {
+ lo_send(_engine_addr, "/ingen/set_polyphony", "isF",
+ next_id(),
+ path.c_str());
+ }
+}
+
void
OSCEngineSender::enable_patch(const string& patch_path)
diff --git a/src/libs/client/OSCEngineSender.hpp b/src/libs/client/OSCEngineSender.hpp
index fc3c100d..c3a9b46a 100644
--- a/src/libs/client/OSCEngineSender.hpp
+++ b/src/libs/client/OSCEngineSender.hpp
@@ -94,6 +94,10 @@ public:
void destroy(const string& path);
void clear_patch(const string& patch_path);
+
+ void set_polyphony(const string& patch_path, uint32_t poly);
+
+ void set_polyphonic(const string& path, bool poly);
void enable_patch(const string& patch_path);