REGISTER_CALLBACK (serv, "/select/comp_mode", "f", sel_comp_mode);
REGISTER_CALLBACK (serv, "/select/comp_makeup", "f", sel_comp_makeup);
REGISTER_CALLBACK (serv, "/select/eq_enable", "f", sel_eq_enable);
- REGISTER_CALLBACK (serv, "/select/eq_hpf", "f", sel_eq_hpf);
+ REGISTER_CALLBACK (serv, "/select/eq_hpf/freq", "f", sel_eq_hpf_freq);
+ REGISTER_CALLBACK (serv, "/select/eq_hpf/enable", "f", sel_eq_hpf_enable);
+ REGISTER_CALLBACK (serv, "/select/eq_hpf/slope", "f", sel_eq_hpf_slope);
+ REGISTER_CALLBACK (serv, "/select/eq_lpf/freq", "f", sel_eq_lpf_freq);
+ REGISTER_CALLBACK (serv, "/select/eq_lpf/enable", "f", sel_eq_lpf_enable);
+ REGISTER_CALLBACK (serv, "/select/eq_lpf/slope", "f", sel_eq_lpf_slope);
REGISTER_CALLBACK (serv, "/select/eq_gain", "if", sel_eq_gain);
REGISTER_CALLBACK (serv, "/select/eq_freq", "if", sel_eq_freq);
REGISTER_CALLBACK (serv, "/select/eq_q", "if", sel_eq_q);
len = strlen (path);
if (strstr (path, "/automation")) {
- ret = set_automation (path, argv, argc, msg);
+ ret = set_automation (path, types, argv, argc, msg);
} else
if (strstr (path, "/touch")) {
- ret = touch_detect (path, argv, argc, msg);
+ ret = touch_detect (path, types, argv, argc, msg);
} else
if (len >= 17 && !strcmp (&path[len-15], "/#current_value")) {
// strip calls
int
-OSC::set_automation (const char *path, lo_arg **argv, int argc, lo_message msg)
+OSC::set_automation (const char *path, const char* types, lo_arg **argv, int argc, lo_message msg)
{
if (!session) return -1;
boost::shared_ptr<Stripable> strp = boost::shared_ptr<Stripable>();
uint32_t ctr = 0;
uint32_t aut = 0;
+ uint32_t ssid;
if (argc) {
if (argv[argc - 1]->f) {
if (!strncmp (path, "/strip/", 7)) {
// find ssid and stripable
if (argc > 1) {
- strp = get_strip (argv[0]->i, get_address (msg));
+ if (types[1] == 'f') {
+ ssid = (uint32_t)argv[0]->f;
+ } else {
+ ssid = argv[0]->i;
+ }
+ strp = get_strip (ssid, get_address (msg));
} else {
- uint32_t ssid = atoi (&(strrchr (path, '/' ))[1]);
+ ssid = atoi (&(strrchr (path, '/' ))[1]);
strp = get_strip (ssid, get_address (msg));
}
ctr = 7;
}
int
-OSC::touch_detect (const char *path, lo_arg **argv, int argc, lo_message msg)
+OSC::touch_detect (const char *path, const char* types, lo_arg **argv, int argc, lo_message msg)
{
if (!session) return -1;
boost::shared_ptr<Stripable> strp = boost::shared_ptr<Stripable>();
uint32_t ctr = 0;
uint32_t touch = 0;
+ uint32_t ssid;
if (argc) {
if (argv[argc - 1]->f) {
if (!strncmp (path, "/strip/", 7)) {
// find ssid and stripable
if (argc > 1) {
- strp = get_strip (argv[0]->i, get_address (msg));
+ if (types[1] == 'f') {
+ ssid = (uint32_t)argv[0]->f;
+ } else {
+ ssid = argv[0]->i;
+ }
+ strp = get_strip (ssid, get_address (msg));
} else {
- uint32_t ssid = atoi (&(strrchr (path, '/' ))[1]);
+ ssid = atoi (&(strrchr (path, '/' ))[1]);
strp = get_strip (ssid, get_address (msg));
}
ctr = 7;
//start touch
if (control->automation_state() == Touch && !control->touching ()) {
control->start_touch (control->session().transport_frame());
+ ret = 0;
}
} else {
// end touch
control->stop_touch (true, control->session().transport_frame());
+ ret = 0;
}
// just in case some crazy surface starts sending control values before touch
FakeTouchMap::iterator x = _touch_timeout.find(control);
}
int
-OSC::sel_eq_hpf (float val, lo_message msg)
+OSC::sel_eq_hpf_freq (float val, lo_message msg)
{
OSCSurface *sur = get_surface(get_address (msg));
boost::shared_ptr<Stripable> s;
return 0;
}
}
- return sel_fail ("eq_hpf", 0, get_address (msg));
+ return sel_fail ("eq_hpf/freq", 0, get_address (msg));
+}
+
+int
+OSC::sel_eq_lpf_freq (float val, lo_message msg)
+{
+ OSCSurface *sur = get_surface(get_address (msg));
+ boost::shared_ptr<Stripable> s;
+ if (sur->expand_enable) {
+ s = get_strip (sur->expand, get_address (msg));
+ } else {
+ s = _select;
+ }
+ if (s) {
+ if (s->filter_freq_controllable(false)) {
+ s->filter_freq_controllable(false)->set_value (s->filter_freq_controllable(false)->interface_to_internal (val), PBD::Controllable::NoGroup);
+ return 0;
+ }
+ }
+ return sel_fail ("eq_lpf/freq", 0, get_address (msg));
+}
+
+int
+OSC::sel_eq_hpf_enable (float val, lo_message msg)
+{
+ OSCSurface *sur = get_surface(get_address (msg));
+ boost::shared_ptr<Stripable> s;
+ if (sur->expand_enable) {
+ s = get_strip (sur->expand, get_address (msg));
+ } else {
+ s = _select;
+ }
+ if (s) {
+ if (s->filter_enable_controllable(true)) {
+ s->filter_enable_controllable(true)->set_value (s->filter_enable_controllable(true)->interface_to_internal (val), PBD::Controllable::NoGroup);
+ return 0;
+ }
+ }
+ return sel_fail ("eq_hpf/enable", 0, get_address (msg));
+}
+
+int
+OSC::sel_eq_lpf_enable (float val, lo_message msg)
+{
+ OSCSurface *sur = get_surface(get_address (msg));
+ boost::shared_ptr<Stripable> s;
+ if (sur->expand_enable) {
+ s = get_strip (sur->expand, get_address (msg));
+ } else {
+ s = _select;
+ }
+ if (s) {
+ if (s->filter_enable_controllable(false)) {
+ s->filter_enable_controllable(false)->set_value (s->filter_enable_controllable(false)->interface_to_internal (val), PBD::Controllable::NoGroup);
+ return 0;
+ }
+ }
+ return sel_fail ("eq_lpf/enable", 0, get_address (msg));
+}
+
+int
+OSC::sel_eq_hpf_slope (float val, lo_message msg)
+{
+ OSCSurface *sur = get_surface(get_address (msg));
+ boost::shared_ptr<Stripable> s;
+ if (sur->expand_enable) {
+ s = get_strip (sur->expand, get_address (msg));
+ } else {
+ s = _select;
+ }
+ if (s) {
+ if (s->filter_slope_controllable(true)) {
+ s->filter_slope_controllable(true)->set_value (s->filter_slope_controllable(true)->interface_to_internal (val), PBD::Controllable::NoGroup);
+ return 0;
+ }
+ }
+ return sel_fail ("eq_hpf/slope", 0, get_address (msg));
+}
+
+int
+OSC::sel_eq_lpf_slope (float val, lo_message msg)
+{
+ OSCSurface *sur = get_surface(get_address (msg));
+ boost::shared_ptr<Stripable> s;
+ if (sur->expand_enable) {
+ s = get_strip (sur->expand, get_address (msg));
+ } else {
+ s = _select;
+ }
+ if (s) {
+ if (s->filter_slope_controllable(false)) {
+ s->filter_slope_controllable(false)->set_value (s->filter_slope_controllable(false)->interface_to_internal (val), PBD::Controllable::NoGroup);
+ return 0;
+ }
+ }
+ return sel_fail ("eq_lpf/slope", 0, get_address (msg));
}
-// need to add two more filter controls
int
OSC::sel_eq_gain (int id, float val, lo_message msg)