summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2017-05-14 20:55:24 -0700
committerLen Ovens <len@ovenwerks.net>2017-05-15 07:43:59 -0700
commit7e791981f0db6ce6448833fac0b5d41dff61a319 (patch)
treed76c1ae94cc8c5435202538ae709d257fbd86b72 /libs/surfaces
parentfee4b7b3ea6079c9df1118d85226b4966f6526cf (diff)
OSC: added automation name feedback
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/osc/osc.cc2
-rw-r--r--libs/surfaces/osc/osc_route_observer.cc9
-rw-r--r--libs/surfaces/osc/osc_select_observer.cc8
3 files changed, 18 insertions, 1 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc
index 0a412ee7de..052e9502c0 100644
--- a/libs/surfaces/osc/osc.cc
+++ b/libs/surfaces/osc/osc.cc
@@ -2244,6 +2244,7 @@ OSC::set_automation (const char *path, size_t len, lo_arg **argv, int argc, lo_m
}
if (strp) {
boost::shared_ptr<AutomationControl> control = boost::shared_ptr<AutomationControl>();
+ // other automatable controls can be added by repeating the next 6.5 lines
if ((!strncmp (&path[ctr], "fader", 5)) || (!strncmp (&path[ctr], "gain", 4))) {
if (strp->gain_control ()) {
control = strp->gain_control ();
@@ -3713,6 +3714,7 @@ OSC::sel_eq_hpf (float val, lo_message msg)
}
return sel_fail ("eq_hpf", 0, get_address (msg));
}
+// need to add two more filter controls
int
OSC::sel_eq_gain (int id, float val, lo_message msg)
diff --git a/libs/surfaces/osc/osc_route_observer.cc b/libs/surfaces/osc/osc_route_observer.cc
index 8690a47a7f..c33ad7cc2b 100644
--- a/libs/surfaces/osc/osc_route_observer.cc
+++ b/libs/surfaces/osc/osc_route_observer.cc
@@ -378,6 +378,7 @@ OSCRouteObserver::gain_automation (string path)
{
lo_message msg = lo_message_new ();
string apath = string_compose ("%1/automation", path);
+ string npath = string_compose ("%1/automation_name", path);
if (feedback[2]) {
apath = set_path (apath);
@@ -387,28 +388,34 @@ OSCRouteObserver::gain_automation (string path)
boost::shared_ptr<GainControl> control = _strip->gain_control();
as = control->alist()->automation_state();
+ string auto_name;
float output;
switch (as) {
case ARDOUR::Off:
output = 0;
+ auto_name = "Manual";
break;
case ARDOUR::Play:
output = 1;
+ auto_name = "Play";
break;
case ARDOUR::Write:
output = 2;
+ auto_name = "Write";
break;
case ARDOUR::Touch:
output = 3;
+ auto_name = "Touch";
break;
default:
break;
}
- lo_message_add_float (msg, output);
send_gain_message (path, control);
+ lo_message_add_float (msg, output);
lo_send_message (addr, apath.c_str(), msg);
lo_message_free (msg);
+ text_with_id (npath, ssid, auto_name);
}
string
diff --git a/libs/surfaces/osc/osc_select_observer.cc b/libs/surfaces/osc/osc_select_observer.cc
index 151b00b6e0..ff9020585a 100644
--- a/libs/surfaces/osc/osc_select_observer.cc
+++ b/libs/surfaces/osc/osc_select_observer.cc
@@ -517,18 +517,23 @@ OSCSelectObserver::gain_automation ()
{
float output;
as = _strip->gain_control()->alist()->automation_state();
+ string auto_name;
switch (as) {
case ARDOUR::Off:
output = 0;
+ auto_name = "Manual";
break;
case ARDOUR::Play:
output = 1;
+ auto_name = "Play";
break;
case ARDOUR::Write:
output = 2;
+ auto_name = "Write";
break;
case ARDOUR::Touch:
output = 3;
+ auto_name = "Touch";
break;
default:
break;
@@ -536,8 +541,10 @@ OSCSelectObserver::gain_automation ()
if (gainmode) {
send_float ("/select/fader/automation", output);
+ text_message ("/select/fader/automation_name", auto_name);
} else {
send_float ("/select/gain/automation", output);
+ text_message ("/select/gain/automation_name", auto_name);
}
gain_message ();
@@ -629,6 +636,7 @@ OSCSelectObserver::eq_init()
change_message ("/select/eq_hpf", _strip->filter_freq_controllable(true));
}
// TODO LPF and LPF/HPF enable ctrls.
+
if (_strip->eq_enable_controllable ()) {
_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());
enable_message ("/select/eq_enable", _strip->eq_enable_controllable());