OSC: added automation name feedback
This commit is contained in:
parent
fee4b7b3ea
commit
7e791981f0
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue
Block a user