summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-14 23:00:28 +0200
committerRobin Gareus <robin@gareus.org>2017-04-14 23:03:31 +0200
commit60c12df5171932a16437981846f547378213dba4 (patch)
tree43120f04f70f8c93182d0b6f2ba723d0072ce260
parent74c8ba5c9ac865e5d8455aee4c62c1d10018bdbb (diff)
Fondle Port 8
* only start touch on parameters in "Touch" mode. * fix "mute clear" (also affect mute-automation in touch)
-rw-r--r--libs/surfaces/faderport8/actions.cc13
-rw-r--r--libs/surfaces/faderport8/fp8_strip.cc10
2 files changed, 12 insertions, 11 deletions
diff --git a/libs/surfaces/faderport8/actions.cc b/libs/surfaces/faderport8/actions.cc
index 536257ca38..0d95b3cdc7 100644
--- a/libs/surfaces/faderport8/actions.cc
+++ b/libs/surfaces/faderport8/actions.cc
@@ -240,7 +240,10 @@ FaderPort8::button_mute_clear ()
continue;
}
boost::shared_ptr<AutomationControl> ac = (*i)->mute_control();
- if (ac) {
+ if (ac && ac->get_value () > 0) {
+ if (ac->automation_state() == Touch && !ac->touching ()) {
+ ac->start_touch (ac->session().transport_frame());
+ }
cl->push_back (ac);
}
}
@@ -332,7 +335,7 @@ FaderPort8::button_encoder ()
ac = session->master_out()->gain_control ();
}
if (ac) {
- if (!ac->touching ()) {
+ if (ac->automation_state() == Touch && !ac->touching ()) {
ac->start_touch (ac->session().transport_frame());
}
ac->set_value (ac->normal(), PBD::Controllable::NoGroup);
@@ -412,7 +415,7 @@ FaderPort8::encoder_navigate (bool neg, int steps)
if (ac) {
double v = ac->internal_to_interface (ac->get_value());
v = std::max (0.0, std::min (1.0, v + steps * (neg ? -.01 : .01)));
- if (!ac->touching ()) {
+ if (ac->automation_state() == Touch && !ac->touching ()) {
ac->start_touch (ac->session().transport_frame());
}
ac->set_value (ac->interface_to_internal(v), PBD::Controllable::NoGroup);
@@ -446,7 +449,7 @@ FaderPort8::button_parameter ()
ac = s->pan_azimuth_control ();
}
if (ac) {
- if (!ac->touching ()) {
+ if (ac->automation_state() == Touch && !ac->touching ()) {
ac->start_touch (ac->session().transport_frame());
}
ac->set_value (ac->normal(), PBD::Controllable::UseGroup);
@@ -480,7 +483,7 @@ FaderPort8::encoder_parameter (bool neg, int steps)
if (ac) {
double v = ac->internal_to_interface (ac->get_value());
v = std::max (0.0, std::min (1.0, v + steps * (neg ? -.01 : .01)));
- if (!ac->touching ()) {
+ if (ac->automation_state() == Touch && !ac->touching ()) {
ac->start_touch (ac->session().transport_frame());
}
ac->set_value (ac->interface_to_internal(v), PBD::Controllable::UseGroup);
diff --git a/libs/surfaces/faderport8/fp8_strip.cc b/libs/surfaces/faderport8/fp8_strip.cc
index ba3ba318f4..3bedf0e85c 100644
--- a/libs/surfaces/faderport8/fp8_strip.cc
+++ b/libs/surfaces/faderport8/fp8_strip.cc
@@ -19,10 +19,8 @@
#include "ardour/automation_control.h"
#include "ardour/gain_control.h"
#include "ardour/meter.h"
-#include "ardour/mute_control.h"
#include "ardour/plugin_insert.h"
#include "ardour/session.h"
-#include "ardour/solo_control.h"
#include "ardour/stripable.h"
#include "ardour/track.h"
#include "ardour/value_as_string.h"
@@ -281,7 +279,7 @@ FP8Strip::midi_fader (float val)
if (!ac) {
return false;
}
- if (!ac->touching ()) {
+ if (ac->automation_state() == Touch && !ac->touching ()) {
ac->start_touch (ac->session().transport_frame());
}
ac->set_value (ac->interface_to_internal (val), group_mode ());
@@ -306,7 +304,7 @@ void
FP8Strip::set_mute (bool on)
{
if (_mute_ctrl) {
- if (!_mute_ctrl->touching ()) {
+ if (_mute_ctrl->automation_state() == Touch && !_mute_ctrl->touching ()) {
_mute_ctrl->start_touch (_mute_ctrl->session().transport_frame());
}
_mute_ctrl->set_value (on ? 1.0 : 0.0, group_mode ());
@@ -317,7 +315,7 @@ void
FP8Strip::set_solo (bool on)
{
if (_solo_ctrl) {
- if (!_solo_ctrl->touching ()) {
+ if (_solo_ctrl->automation_state() == Touch && !_solo_ctrl->touching ()) {
_solo_ctrl->start_touch (_solo_ctrl->session().transport_frame());
}
_solo_ctrl->set_value (on ? 1.0 : 0.0, group_mode ());
@@ -340,7 +338,7 @@ FP8Strip::set_select ()
assert (!_x_select_ctrl);
_select_plugin_functor ();
} else if (_x_select_ctrl) {
- if (!_x_select_ctrl->touching ()) {
+ if (_x_select_ctrl->automation_state() == Touch && !_x_select_ctrl->touching ()) {
_x_select_ctrl->start_touch (_x_select_ctrl->session().transport_frame());
}
const bool on = !select_button ().is_active();