summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-01-15 01:31:12 +0100
committerRobin Gareus <robin@gareus.org>2016-01-15 01:31:12 +0100
commitd3ab91d1714293f5262c1ddb56a2598902ea5b47 (patch)
treea25522363971b30471bd6b4d59c53f636147d1e0 /libs
parentb6c78ad9c80e33f450142d5e5c03caa7eba6d4af (diff)
touchOSC compat for common route operations
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/osc/osc.cc28
1 files changed, 28 insertions, 0 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc
index 35c437eeed..f245a65ad3 100644
--- a/libs/surfaces/osc/osc.cc
+++ b/libs/surfaces/osc/osc.cc
@@ -676,6 +676,34 @@ OSC::catchall (const char *path, const char* types, lo_arg **argv, int argc, lo_
}
ret = 0;
+ } else if (argc == 1 && types[0] == 'f') { // single float -- probably TouchOSC
+ if (!strncmp (path, "/ardour/routes/gainabs/", 23) && strlen (path) > 23) {
+ int rid = atoi (&path[23]);
+ // use some power-scale mapping??
+ route_set_gain_abs (rid, argv[0]->f);
+ ret = 0;
+ }
+ else if (!strncmp (path, "/ardour/routes/trimabs/", 23) && strlen (path) > 23) {
+ int rid = atoi (&path[23]);
+ // normalize 0..1 ?
+ route_set_trim_abs (rid, argv[0]->f);
+ ret = 0;
+ }
+ else if (!strncmp (path, "/ardour/routes/mute/", 20) && strlen (path) > 20) {
+ int rid = atoi (&path[20]);
+ route_mute (rid, argv[0]->f == 1.0);
+ ret = 0;
+ }
+ else if (!strncmp (path, "/ardour/routes/solo/", 20) && strlen (path) > 20) {
+ int rid = atoi (&path[20]);
+ route_solo (rid, argv[0]->f == 1.0);
+ ret = 0;
+ }
+ else if (!strncmp (path, "/ardour/routes/recenable/", 25) && strlen (path) > 25) {
+ int rid = atoi (&path[25]);
+ route_recenable (rid, argv[0]->f == 1.0);
+ ret = 0;
+ }
}
if ((ret && _debugmode == Unhandled)) {