2 Copyright (C) 2009 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include "boost/lambda/lambda.hpp"
23 #include "ardour/session.h"
24 #include "ardour/track.h"
25 #include "ardour/monitor_control.h"
26 #include "ardour/dB.h"
27 #include "ardour/meter.h"
28 #include "ardour/phase_control.h"
29 #include "ardour/solo_isolate_control.h"
30 #include "ardour/solo_safe_control.h"
31 #include "ardour/route.h"
32 #include "ardour/send.h"
33 #include "ardour/processor.h"
36 #include "osc_select_observer.h"
44 using namespace ARDOUR;
45 using namespace ArdourSurface;
47 OSCSelectObserver::OSCSelectObserver (boost::shared_ptr<Stripable> s, lo_address a, uint32_t gm, std::bitset<32> fb)
54 addr = lo_address_new (lo_address_get_hostname(a) , lo_address_get_port(a));
57 if (feedback[0]) { // buttons are separate feedback
58 _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::name_changed, this, boost::lambda::_1), OSC::instance());
59 name_changed (ARDOUR::Properties::name);
61 _strip->mute_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/mute"), _strip->mute_control()), OSC::instance());
62 change_message ("/select/mute", _strip->mute_control());
64 _strip->solo_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/solo"), _strip->solo_control()), OSC::instance());
65 change_message ("/select/solo", _strip->solo_control());
67 if (_strip->solo_isolate_control()) {
68 _strip->solo_isolate_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_iso"), _strip->solo_isolate_control()), OSC::instance());
69 change_message ("/select/solo_iso", _strip->solo_isolate_control());
72 if (_strip->solo_safe_control()) {
73 _strip->solo_safe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/solo_safe"), _strip->solo_safe_control()), OSC::instance());
74 change_message ("/select/solo_safe", _strip->solo_safe_control());
77 boost::shared_ptr<Track> track = boost::dynamic_pointer_cast<Track> (_strip);
79 track->monitoring_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::monitor_status, this, track->monitoring_control()), OSC::instance());
80 monitor_status (track->monitoring_control());
83 boost::shared_ptr<AutomationControl> rec_controllable = _strip->rec_enable_control ();
84 if (rec_controllable) {
85 rec_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/recenable"), _strip->rec_enable_control()), OSC::instance());
86 change_message ("/select/recenable", _strip->rec_enable_control());
89 boost::shared_ptr<AutomationControl> recsafe_controllable = _strip->rec_safe_control ();
90 if (recsafe_controllable) {
91 recsafe_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/record_safe"), _strip->rec_safe_control()), OSC::instance());
92 change_message ("/select/record_safe", _strip->rec_safe_control());
95 boost::shared_ptr<AutomationControl> phase_controllable = _strip->phase_control ();
96 if (phase_controllable) {
97 phase_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/polarity"), _strip->phase_control()), OSC::instance());
98 change_message ("/select/polarity", _strip->phase_control());
103 if (feedback[1]) { // level controls
104 _strip->gain_control()->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::gain_automation, this), OSC::instance());
105 _strip->gain_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::gain_message, this), OSC::instance());
108 boost::shared_ptr<Controllable> trim_controllable = boost::dynamic_pointer_cast<Controllable>(_strip->trim_control());
109 if (trim_controllable) {
110 trim_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::trim_message, this, X_("/select/trimdB"), _strip->trim_control()), OSC::instance());
111 trim_message ("/select/trimdB", _strip->trim_control());
114 boost::shared_ptr<Controllable> pan_controllable = boost::dynamic_pointer_cast<Controllable>(_strip->pan_azimuth_control());
115 if (pan_controllable) {
116 pan_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), OSC::instance());
117 change_message ("/select/pan_stereo_position", _strip->pan_azimuth_control());
120 boost::shared_ptr<Controllable> width_controllable = boost::dynamic_pointer_cast<Controllable>(_strip->pan_width_control());
121 if (width_controllable) {
122 width_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), OSC::instance());
123 change_message ("/select/pan_stereo_width", _strip->pan_width_control());
127 if (feedback[13]) { // Well known controls
128 // Rest of possible pan controls... Untested because I can't find a way to get them in the GUI :)
129 if (_strip->pan_elevation_control ()) {
130 _strip->pan_elevation_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_elevation_position"), _strip->pan_elevation_control()), OSC::instance());
131 change_message ("/select/pan_elevation_position", _strip->pan_elevation_control());
133 if (_strip->pan_frontback_control ()) {
134 _strip->pan_frontback_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_frontback_position"), _strip->pan_frontback_control()), OSC::instance());
135 change_message ("/select/pan_frontback_position", _strip->pan_frontback_control());
137 if (_strip->pan_lfe_control ()) {
138 _strip->pan_lfe_control()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/pan_lfe_control"), _strip->pan_lfe_control()), OSC::instance());
139 change_message ("/select/pan_lfe_control", _strip->pan_lfe_control());
143 // detecting processor changes requires cast to route
144 boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route>(_strip);
146 r->processors_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_restart, this, -1), OSC::instance());
152 if (_strip->comp_enable_controllable ()) {
153 _strip->comp_enable_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message, this, X_("/select/comp_enable"), _strip->comp_enable_controllable()), OSC::instance());
154 enable_message ("/select/comp_enable", _strip->comp_enable_controllable());
156 if (_strip->comp_threshold_controllable ()) {
157 _strip->comp_threshold_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_threshold"), _strip->comp_threshold_controllable()), OSC::instance());
158 change_message ("/select/comp_threshold", _strip->comp_threshold_controllable());
160 if (_strip->comp_speed_controllable ()) {
161 _strip->comp_speed_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_speed"), _strip->comp_speed_controllable()), OSC::instance());
162 change_message ("/select/comp_speed", _strip->comp_speed_controllable());
164 if (_strip->comp_mode_controllable ()) {
165 _strip->comp_mode_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::comp_mode, this), OSC::instance());
168 if (_strip->comp_makeup_controllable ()) {
169 _strip->comp_makeup_controllable ()->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/comp_makeup"), _strip->comp_makeup_controllable()), OSC::instance());
170 change_message ("/select/comp_makeup", _strip->comp_makeup_controllable());
178 OSCSelectObserver::~OSCSelectObserver ()
180 strip_connections.drop_connections ();
181 // all strip buttons should be off and faders 0 and etc.
182 if (feedback[0]) { // buttons are separate feedback
183 send_float ("/select/expand", 0);
184 text_message ("/select/name", " ");
185 text_message ("/select/comment", " ");
186 send_float ("/select/mute", 0);
187 send_float ("/select/solo", 0);
188 send_float ("/select/recenable", 0);
189 send_float ("/select/record_safe", 0);
190 send_float ("/select/monitor_input", 0);
191 send_float ("/select/monitor_disk", 0);
192 send_float ("/select/polarity", 0);
193 send_float ("/select/n_inputs", 0);
194 send_float ("/select/n_outputs", 0);
196 if (feedback[1]) { // level controls
198 send_float ("/select/fader", 0);
200 send_float ("/select/gain", -193);
202 send_float ("/select/trimdB", 0);
203 send_float ("/select/pan_stereo_position", 0.5);
204 send_float ("/select/pan_stereo_width", 1);
207 send_float ("/select/signal", 0);
211 send_float ("/select/meter", 0);
213 send_float ("/select/meter", -193);
215 }else if (feedback[8]) {
216 send_float ("/select/meter", 0);
218 if (feedback[13]) { // Well known controls
219 send_float ("/select/pan_elevation_position", 0);
220 send_float ("/select/pan_frontback_position", .5);
221 send_float ("/select/pan_lfe_control", 0);
222 send_float ("/select/comp_enable", 0);
223 send_float ("/select/comp_threshold", 0);
224 send_float ("/select/comp_speed", 0);
225 send_float ("/select/comp_mode", 0);
226 text_message ("/select/comp_mode_name", " ");
227 text_message ("/select/comp_speed_name", " ");
228 send_float ("/select/comp_makeup", 0);
233 lo_address_free (addr);
237 OSCSelectObserver::send_init()
239 // we don't know how many there are, so find out.
243 if (_strip->send_level_controllable (nsends)) {
244 _strip->send_level_controllable(nsends)->Changed.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_gain, this, nsends, _strip->send_level_controllable(nsends)), OSC::instance());
245 send_timeout.push_back (0);
246 send_gain (nsends, _strip->send_level_controllable(nsends));
250 if (_strip->send_enable_controllable (nsends)) {
251 _strip->send_enable_controllable(nsends)->Changed.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message_with_id, this, X_("/select/send_enable"), nsends + 1, _strip->send_enable_controllable(nsends)), OSC::instance());
252 enable_message_with_id ("/select/send_enable", nsends + 1, _strip->send_enable_controllable(nsends));
255 boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route> (_strip);
257 // should never get here
258 send_float_with_id ("/select/send_enable", nsends + 1, 0);
260 boost::shared_ptr<Send> snd = boost::dynamic_pointer_cast<Send> (r->nth_send(nsends));
262 boost::shared_ptr<Processor> proc = boost::dynamic_pointer_cast<Processor> (snd);
263 proc->ActiveChanged.connect (send_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_enable, this, X_("/select/send_enable"), nsends + 1, proc), OSC::instance());
264 send_float_with_id ("/select/send_enable", nsends + 1, proc->enabled());
267 // this should get signalled by the route the send goes to, (TODO)
268 if (!gainmode && sends) { // if the gain control is there, this is too
269 text_with_id ("/select/send_name", nsends + 1, _strip->send_name(nsends));
271 // Send numbers are 0 based, OSC is 1 based so this gets incremented at the end
279 OSCSelectObserver::send_end ()
281 send_connections.drop_connections ();
282 for (uint32_t i = 1; i <= nsends; i++) {
284 send_float_with_id ("/select/send_fader", i, 0);
286 send_float_with_id ("/select/send_gain", i, -193);
289 send_float_with_id ("/select/send_enable", i, 0);
291 text_with_id ("/select/send_name", i, " ");
297 OSCSelectObserver::send_restart(int x)
304 OSCSelectObserver::tick ()
306 if (feedback[7] || feedback[8] || feedback[9]) { // meters enabled
308 if (_strip->peak_meter()) {
309 now_meter = _strip->peak_meter()->meter_level(0, MeterMCP);
313 if (now_meter < -144) now_meter = -193;
314 if (_last_meter != now_meter) {
315 if (feedback[7] || feedback[8]) {
316 string path = "/select/meter";
317 lo_message msg = lo_message_new ();
318 if (gainmode && feedback[7]) {
319 lo_message_add_float (msg, ((now_meter + 94) / 100));
320 lo_send_message (addr, path.c_str(), msg);
321 } else if ((!gainmode) && feedback[7]) {
322 lo_message_add_float (msg, now_meter);
323 lo_send_message (addr, path.c_str(), msg);
324 } else if (feedback[8]) {
325 uint32_t ledlvl = (uint32_t)(((now_meter + 54) / 3.75)-1);
326 uint16_t ledbits = ~(0xfff<<ledlvl);
327 lo_message_add_int32 (msg, ledbits);
328 lo_send_message (addr, path.c_str(), msg);
330 lo_message_free (msg);
333 string path = "/select/signal";
334 lo_message msg = lo_message_new ();
336 if (now_meter < -40) {
341 lo_message_add_float (msg, signal);
342 lo_send_message (addr, path.c_str(), msg);
343 lo_message_free (msg);
346 _last_meter = now_meter;
351 if (gain_timeout == 1) {
352 text_message ("/select/name", _strip->name());
357 if (as == ARDOUR::Play || as == ARDOUR::Touch) {
358 if(_last_gain != _strip->gain_control()->get_value()) {
359 _last_gain = _strip->gain_control()->get_value();
365 for (uint32_t i = 0; i < send_timeout.size(); i++) {
366 if (send_timeout[i]) {
367 if (send_timeout[i] == 1) {
368 text_with_id ("/select/send_name", i + 1, _strip->send_name(i));
378 OSCSelectObserver::name_changed (const PBD::PropertyChange& what_changed)
380 if (!what_changed.contains (ARDOUR::Properties::name)) {
388 text_message ("/select/name", _strip->name());
389 boost::shared_ptr<Route> route = boost::dynamic_pointer_cast<Route> (_strip);
391 //spit out the comment at the same time
392 text_message ("/select/comment", route->comment());
393 // lets tell the surface how many inputs this strip has
394 send_float ("/select/n_inputs", (float) route->n_inputs().n_total());
395 // lets tell the surface how many outputs this strip has
396 send_float ("/select/n_outputs", (float) route->n_outputs().n_total());
401 OSCSelectObserver::change_message (string path, boost::shared_ptr<Controllable> controllable)
403 lo_message msg = lo_message_new ();
404 float val = controllable->get_value();
406 lo_message_add_float (msg, (float) controllable->internal_to_interface (val));
408 lo_send_message (addr, path.c_str(), msg);
409 lo_message_free (msg);
413 OSCSelectObserver::enable_message (string path, boost::shared_ptr<Controllable> controllable)
415 float val = controllable->get_value();
417 send_float (path, 1);
419 send_float (path, 0);
425 OSCSelectObserver::change_message_with_id (string path, uint32_t id, boost::shared_ptr<Controllable> controllable)
427 lo_message msg = lo_message_new ();
428 float val = controllable->get_value();
430 path = set_path (path, id);
432 lo_message_add_int32 (msg, id);
435 lo_message_add_float (msg, (float) controllable->internal_to_interface (val));
437 lo_send_message (addr, path.c_str(), msg);
438 lo_message_free (msg);
442 OSCSelectObserver::enable_message_with_id (string path, uint32_t id, boost::shared_ptr<Controllable> controllable)
444 float val = controllable->get_value();
446 send_float_with_id (path, id, 1);
448 send_float_with_id (path, id, 0);
453 OSCSelectObserver::text_message (string path, std::string text)
455 lo_message msg = lo_message_new ();
457 lo_message_add_string (msg, text.c_str());
459 lo_send_message (addr, path.c_str(), msg);
460 lo_message_free (msg);
464 OSCSelectObserver::monitor_status (boost::shared_ptr<Controllable> controllable)
467 float val = controllable->get_value();
482 send_float ("/select/monitor_input", (float) input);
483 send_float ("/select/monitor_disk", (float) disk);
487 OSCSelectObserver::trim_message (string path, boost::shared_ptr<Controllable> controllable)
489 lo_message msg = lo_message_new ();
491 lo_message_add_float (msg, (float) accurate_coefficient_to_dB (controllable->get_value()));
493 lo_send_message (addr, path.c_str(), msg);
494 lo_message_free (msg);
498 OSCSelectObserver::gain_message ()
500 float value = _strip->gain_control()->get_value();
503 text_message ("/select/name", string_compose ("%1%2%3", std::fixed, std::setprecision(2), accurate_coefficient_to_dB (value)));
505 send_float ("/select/fader", gain_to_slider_position (value));
508 send_float ("/select/gain", -200);
510 send_float ("/select/gain", accurate_coefficient_to_dB (value));
516 OSCSelectObserver::gain_automation ()
518 as = _strip->gain_control()->alist()->automation_state();
520 send_float ("/select/fader/automation", as);
522 send_float ("/select/gain/automation", as);
529 OSCSelectObserver::send_gain (uint32_t id, boost::shared_ptr<PBD::Controllable> controllable)
531 lo_message msg = lo_message_new ();
536 db = controllable->get_value();
538 if (controllable->get_value() < 1e-15) {
541 db = accurate_coefficient_to_dB (controllable->get_value());
546 path = "/select/send_fader";
548 value = controllable->internal_to_interface (controllable->get_value());
550 value = gain_to_slider_position (controllable->get_value());
552 text_with_id ("/select/send_name" , id + 1, string_compose ("%1%2%3", std::fixed, std::setprecision(2), db));
553 if (send_timeout.size() > id) {
554 send_timeout[id] = 8;
557 path = "/select/send_gain";
562 path = set_path (path, id + 1);
564 lo_message_add_int32 (msg, id + 1);
567 lo_message_add_float (msg, value);
568 lo_send_message (addr, path.c_str(), msg);
569 lo_message_free (msg);
573 OSCSelectObserver::send_enable (string path, uint32_t id, boost::shared_ptr<Processor> proc)
575 // with no delay value is wrong
578 send_float_with_id ("/select/send_enable", id, proc->enabled());
582 OSCSelectObserver::text_with_id (string path, uint32_t id, string name)
584 lo_message msg = lo_message_new ();
586 path = set_path (path, id);
588 lo_message_add_int32 (msg, id);
591 lo_message_add_string (msg, name.c_str());
593 lo_send_message (addr, path.c_str(), msg);
594 lo_message_free (msg);
598 OSCSelectObserver::comp_mode ()
600 change_message ("/select/comp_mode", _strip->comp_mode_controllable());
601 text_message ("/select/comp_mode_name", _strip->comp_mode_name(_strip->comp_mode_controllable()->get_value()));
602 text_message ("/select/comp_speed_name", _strip->comp_speed_name(_strip->comp_mode_controllable()->get_value()));
606 OSCSelectObserver::eq_init()
608 // HPF and enable are special case, rest are in bands
609 if (_strip->eq_hpf_controllable ()) {
610 _strip->eq_hpf_controllable ()->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message, this, X_("/select/eq_hpf"), _strip->eq_hpf_controllable()), OSC::instance());
611 change_message ("/select/eq_hpf", _strip->eq_hpf_controllable());
613 if (_strip->eq_enable_controllable ()) {
614 _strip->eq_enable_controllable ()->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::enable_message, this, X_("/select/eq_enable"), _strip->eq_enable_controllable()), OSC::instance());
615 enable_message ("/select/eq_enable", _strip->eq_enable_controllable());
618 uint32_t eq_bands = _strip->eq_band_cnt ();
623 for (uint32_t i = 0; i < eq_bands; i++) {
624 if (_strip->eq_band_name(i).size()) {
625 text_with_id ("/select/eq_band_name", i + 1, _strip->eq_band_name (i));
627 if (_strip->eq_gain_controllable (i)) {
628 _strip->eq_gain_controllable(i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_gain"), i + 1, _strip->eq_gain_controllable(i)), OSC::instance());
629 change_message_with_id ("/select/eq_gain", i + 1, _strip->eq_gain_controllable(i));
631 if (_strip->eq_freq_controllable (i)) {
632 _strip->eq_freq_controllable(i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_freq"), i + 1, _strip->eq_freq_controllable(i)), OSC::instance());
633 change_message_with_id ("/select/eq_freq", i + 1, _strip->eq_freq_controllable(i));
635 if (_strip->eq_q_controllable (i)) {
636 _strip->eq_q_controllable(i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_q"), i + 1, _strip->eq_q_controllable(i)), OSC::instance());
637 change_message_with_id ("/select/eq_q", i + 1, _strip->eq_q_controllable(i));
639 if (_strip->eq_shape_controllable (i)) {
640 _strip->eq_shape_controllable(i)->Changed.connect (eq_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::change_message_with_id, this, X_("/select/eq_shape"), i + 1, _strip->eq_shape_controllable(i)), OSC::instance());
641 change_message_with_id ("/select/eq_shape", i + 1, _strip->eq_shape_controllable(i));
647 OSCSelectObserver::eq_end ()
649 //need to check feedback for [13]
650 eq_connections.drop_connections ();
651 if (_strip->eq_hpf_controllable ()) {
652 send_float ("/select/eq_hpf", 0);
654 if (_strip->eq_enable_controllable ()) {
655 send_float ("/select/eq_enable", 0);
658 for (uint32_t i = 1; i <= _strip->eq_band_cnt (); i++) {
659 text_with_id ("/select/eq_band_name", i, " ");
660 send_float_with_id ("/select/eq_gain", i, 0);
661 send_float_with_id ("/select/eq_freq", i, 0);
662 send_float_with_id ("/select/eq_q", i, 0);
663 send_float_with_id ("/select/eq_shape", i, 0);
670 OSCSelectObserver::eq_restart(int x)
677 OSCSelectObserver::set_path (string path, uint32_t id)
680 path = string_compose ("%1/%2", path, id);
686 OSCSelectObserver::send_float (string path, float val)
688 lo_message msg = lo_message_new ();
689 lo_message_add_float (msg, val);
691 lo_send_message (addr, path.c_str(), msg);
692 lo_message_free (msg);
697 OSCSelectObserver::send_float_with_id (string path, uint32_t id, float val)
699 lo_message msg = lo_message_new ();
701 path = set_path (path, id);
703 lo_message_add_int32 (msg, id);
706 lo_message_add_float (msg, val);
708 lo_send_message (addr, path.c_str(), msg);
709 lo_message_free (msg);