From 84804f7d90019dff21ea7b99d00dc49fa41a9180 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 17 Apr 2017 20:06:00 +0200 Subject: cont'd FP8 tweaks * include Mixbus PRE plugin on Mixbusses * Mixbus master-assign on right-most "S" button * fix parameter-banking and assignment * fix typo in 029e963fb (fader range constaint) --- libs/surfaces/faderport8/faderport8.cc | 12 +++++++++--- libs/surfaces/faderport8/fp8_strip.cc | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'libs/surfaces') diff --git a/libs/surfaces/faderport8/faderport8.cc b/libs/surfaces/faderport8/faderport8.cc index 6f9c6db251..da9a201b9b 100644 --- a/libs/surfaces/faderport8/faderport8.cc +++ b/libs/surfaces/faderport8/faderport8.cc @@ -1137,6 +1137,10 @@ FaderPort8::spill_plugins () for (uint32_t i = 0; 0 != (proc = r->nth_plugin (i)); ++i) { if (!proc->display_to_user ()) { +#ifdef MIXBUS + boost::shared_ptr pi = boost::dynamic_pointer_cast (proc); + if (pi->is_channelstrip ()) // don't skip MB PRE +#endif continue; } int n_controls = 0; @@ -1188,7 +1192,7 @@ FaderPort8::spill_plugins () break; } boost::shared_ptr pi = boost::dynamic_pointer_cast (proc); - boost::function cb (boost::bind (&FaderPort8::select_plugin, this, i)); + boost::function cb (boost::bind (&FaderPort8::select_plugin, this, procs[i])); _ctrls.strip(id).unset_controllables (FP8Strip::CTRL_ALL & ~FP8Strip::CTRL_TEXT & ~FP8Strip::CTRL_SELECT); _ctrls.strip(id).set_select_cb (cb); @@ -1282,7 +1286,6 @@ FaderPort8::assign_sends () _ctrls.strip(id).set_fader_controllable (send); _ctrls.strip(id).set_text_line (0, s->send_name (i)); _ctrls.strip(id).set_mute_controllable (s->send_enable_controllable (i)); - _ctrls.strip(id).set_solo_controllable (s->master_send_enable_controllable ()); // XXX if (++id == 8) { break; @@ -1292,6 +1295,9 @@ FaderPort8::assign_sends () for (; id < 8; ++id) { _ctrls.strip(id).unset_controllables (FP8Strip::CTRL_ALL & ~FP8Strip::CTRL_TEXT3 & ~FP8Strip::CTRL_SELECT); } +#ifdef MIXBUS // master-assign on last solo + _ctrls.strip(7).set_solo_controllable (s->master_send_enable_controllable ()); +#endif /* set select buttons */ assign_stripables (true); } @@ -1602,7 +1608,6 @@ FaderPort8::bank_param (bool down, bool page) if (down) { dt *= -1; } - _channel_off += dt; switch (_ctrls.fader_mode ()) { case ModePlugins: if (_proc_params.size() > 0) { @@ -1614,6 +1619,7 @@ FaderPort8::bank_param (bool down, bool page) } break; case ModeSend: + _plugin_off += dt; assign_sends (); break; default: diff --git a/libs/surfaces/faderport8/fp8_strip.cc b/libs/surfaces/faderport8/fp8_strip.cc index a0a3b82457..071a6e2cb0 100644 --- a/libs/surfaces/faderport8/fp8_strip.cc +++ b/libs/surfaces/faderport8/fp8_strip.cc @@ -359,8 +359,8 @@ FP8Strip::notify_fader_changed () } float val = 0; if (ac) { - val = ac->internal_to_interface (ac->get_value()) * 16368.f; /* 16 * 1023 */ - val = std::max (0.f, std::min (1.f, val)); + val = ac->internal_to_interface (ac->get_value()); + val = std::max (0.f, std::min (1.f, val)) * 16368.f; /* 16 * 1023 */ } unsigned short mv = lrintf (val); if (mv == _last_fader) { -- cgit v1.2.3