- text_with_id ("/strip/name", ssid, " ");
- clear_strip ("/strip/mute", 0);
- clear_strip ("/strip/solo", 0);
- clear_strip ("/strip/recenable", 0);
- clear_strip ("/strip/record_safe", 0);
- clear_strip ("/strip/monitor_input", 0);
- clear_strip ("/strip/monitor_disk", 0);
- clear_strip ("/strip/gui_select", 0);
- clear_strip ("/strip/select", 0);
+ _strip->PropertyChanged.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::name_changed, this, boost::lambda::_1), OSC::instance());
+ name_changed (ARDOUR::Properties::name);
+ }
+
+ if (feedback[1]) { // level controls
+ _gain_control = _send->gain_control();
+ _gain_control->alist()->automation_state_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::gain_automation, this), OSC::instance());
+ _gain_control->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_gain_message, this), OSC::instance());
+ gain_automation ();
+
+ if (_send->pan_outs() > 1) {
+ boost::shared_ptr<Controllable> pan_controllable = boost::dynamic_pointer_cast<Controllable>(_send->panner_shell()->panner()->pannable()->pan_azimuth_control);
+ if (pan_controllable) {
+ pan_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCRouteObserver::send_change_message, this, X_("/strip/pan_stereo_position"), pan_controllable), OSC::instance());
+ send_change_message (X_("/strip/pan_stereo_position"), pan_controllable);
+ }
+ } else {
+ _osc.float_message_with_id (X_("/strip/pan_stereo_position"), ssid, 0.5, in_line, addr);
+ }
+ }
+ _init = false;
+ tick();
+
+}
+
+void
+OSCRouteObserver::set_expand (uint32_t expand)
+{
+ if (expand != _expand) {
+ _expand = expand;
+ if (expand == ssid) {
+ _osc.float_message_with_id (X_("/strip/expand"), ssid, 1.0, in_line, addr);
+ } else {
+ _osc.float_message_with_id (X_("/strip/expand"), ssid, 0.0, in_line, addr);
+ }
+ }
+}
+
+void
+OSCRouteObserver::set_link_ready (uint32_t not_ready)
+{
+ if (not_ready) {
+ clear_strip ();
+ switch (ssid) {
+ case 1:
+ _osc.text_message_with_id (X_("/strip/name"), ssid, "Device", in_line, addr);
+ break;
+ case 2:
+ _osc.text_message_with_id (X_("/strip/name"), ssid, string_compose ("%1", not_ready), in_line, addr);
+ break;
+ case 3:
+ _osc.text_message_with_id (X_("/strip/name"), ssid, "Missing", in_line, addr);
+ break;
+ case 4:
+ _osc.text_message_with_id (X_("/strip/name"), ssid, "from", in_line, addr);
+ break;
+ case 5:
+ _osc.text_message_with_id (X_("/strip/name"), ssid, "Linkset", in_line, addr);
+ break;
+ default:
+ break;
+ }
+ } else {
+ refresh_strip (_strip, true);
+ }
+}
+
+void
+OSCRouteObserver::clear_strip ()
+{
+ send_clear ();
+ if (feedback[0]) { // buttons are separate feedback
+ _osc.text_message_with_id (X_("/strip/name"), ssid, " ", in_line, addr);