diff options
Diffstat (limited to 'src/libs/client')
-rw-r--r-- | src/libs/client/OSCClientReceiver.cpp | 1 | ||||
-rw-r--r-- | src/libs/client/OSCEngineSender.cpp | 27 | ||||
-rw-r--r-- | src/libs/client/OSCEngineSender.hpp | 4 |
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); |