OSC: Added pan width to selected
This commit is contained in:
parent
199f20ff2c
commit
4905422a47
@ -524,6 +524,7 @@ OSC::register_callbacks()
|
||||
REGISTER_CALLBACK (serv, "/select/fader", "f", sel_fader);
|
||||
REGISTER_CALLBACK (serv, "/select/trimdB", "f", sel_trim);
|
||||
REGISTER_CALLBACK (serv, "/select/pan_stereo_position", "f", sel_pan_position);
|
||||
REGISTER_CALLBACK (serv, "/select/pan_stereo_width", "f", sel_pan_width);
|
||||
|
||||
/* These commands require the route index in addition to the arg; TouchOSC (et al) can't use these */
|
||||
REGISTER_CALLBACK (serv, "/strip/mute", "ii", route_mute);
|
||||
@ -1881,7 +1882,18 @@ OSC::sel_pan_position (float val, lo_message msg)
|
||||
if (sur->surface_sel) {
|
||||
return route_set_pan_stereo_position (sur->surface_sel, val, msg);
|
||||
} else {
|
||||
return route_send_fail ("pan_stereo_position", 0, 0, lo_message_get_source (msg));
|
||||
return route_send_fail ("pan_stereo_position", 0, 0.5, lo_message_get_source (msg));
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
OSC::sel_pan_width (float val, lo_message msg)
|
||||
{
|
||||
OSCSurface *sur = get_surface(lo_message_get_source (msg));
|
||||
if (sur->surface_sel) {
|
||||
return route_set_pan_stereo_width (sur->surface_sel, val, msg);
|
||||
} else {
|
||||
return route_send_fail ("pan_stereo_width", 0, 1, lo_message_get_source (msg));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,6 +337,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||
PATH_CALLBACK1_MSG(sel_fader,f);
|
||||
PATH_CALLBACK1_MSG(sel_trim,f);
|
||||
PATH_CALLBACK1_MSG(sel_pan_position,f);
|
||||
PATH_CALLBACK1_MSG(sel_pan_width,f);
|
||||
|
||||
#define PATH_CALLBACK2(name,arg1type,arg2type) \
|
||||
static int _ ## name (const char *path, const char *types, lo_arg **argv, int argc, void *data, void *user_data) { \
|
||||
@ -459,6 +460,7 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
|
||||
int sel_fader (float state, lo_message msg);
|
||||
int sel_trim (float val, lo_message msg);
|
||||
int sel_pan_position (float val, lo_message msg);
|
||||
int sel_pan_width (float val, lo_message msg);
|
||||
|
||||
void listen_to_route (boost::shared_ptr<ARDOUR::Stripable>, lo_address);
|
||||
void end_listen (boost::shared_ptr<ARDOUR::Stripable>, lo_address);
|
||||
|
@ -92,6 +92,13 @@ OSCSelectObserver::OSCSelectObserver (boost::shared_ptr<Stripable> s, lo_address
|
||||
pan_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_change_message, this, X_("/select/pan_stereo_position"), _strip->pan_azimuth_control()), OSC::instance());
|
||||
send_change_message ("/select/pan_stereo_position", _strip->pan_azimuth_control());
|
||||
}
|
||||
|
||||
boost::shared_ptr<Controllable> width_controllable = boost::dynamic_pointer_cast<Controllable>(_strip->pan_width_control());
|
||||
if (width_controllable) {
|
||||
width_controllable->Changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_change_message, this, X_("/select/pan_stereo_width"), _strip->pan_width_control()), OSC::instance());
|
||||
send_change_message ("/select/pan_stereo_width", _strip->pan_width_control());
|
||||
}
|
||||
|
||||
// detecting processor changes requires cast to route
|
||||
boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route>(_strip);
|
||||
r->processors_changed.connect (strip_connections, MISSING_INVALIDATOR, boost::bind (&OSCSelectObserver::send_restart, this, -1), OSC::instance());
|
||||
@ -127,6 +134,7 @@ OSCSelectObserver::~OSCSelectObserver ()
|
||||
}
|
||||
clear_strip ("/select/trimdB", 0);
|
||||
clear_strip ("/select/pan_stereo_position", 0.5);
|
||||
clear_strip ("/select/pan_stereo_width", 1);
|
||||
}
|
||||
if (feedback[9]) {
|
||||
clear_strip ("/select/signal", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user