summaryrefslogtreecommitdiff
path: root/libs/surfaces/faderport
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-02-20 12:51:47 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2020-02-20 12:53:57 -0700
commit938e65f12a502b51873f851c9e02d097c511b40c (patch)
tree8d463904b659299b852aa611098dd2c5b9fc2b1f /libs/surfaces/faderport
parentb5f2aed234abed54e83ca3032e2542bf2c499b3e (diff)
use MIXBUS approach to User button for Faderport (it's just a button, not a modifier
Diffstat (limited to 'libs/surfaces/faderport')
-rw-r--r--libs/surfaces/faderport/faderport.cc40
1 files changed, 2 insertions, 38 deletions
diff --git a/libs/surfaces/faderport/faderport.cc b/libs/surfaces/faderport/faderport.cc
index ba7e7329af..b3ed8214d1 100644
--- a/libs/surfaces/faderport/faderport.cc
+++ b/libs/surfaces/faderport/faderport.cc
@@ -182,11 +182,7 @@ FaderPort::FaderPort (Session& s)
get_button (Loop).set_action (boost::bind (&BasicUI::add_marker, this, string()), true, ShiftDown);
get_button (Punch).set_action (boost::bind (&BasicUI::prev_marker, this), true, ShiftDown);
-#ifdef MIXBUS
get_button (User).set_action (boost::bind (&BasicUI::next_marker, this), true, ShiftDown);
-#else
- get_button (User).set_action (boost::bind (&BasicUI::next_marker, this), true, ButtonState(ShiftDown|UserDown));
-#endif
get_button (Mute).set_action (boost::bind (&FaderPort::mute, this), true);
get_button (Solo).set_action (boost::bind (&FaderPort::solo, this), true);
@@ -366,14 +362,6 @@ FaderPort::button_handler (MIDI::Parser &, MIDI::EventTwoBytes* tb)
case Rewind:
bs = RewindDown;
break;
-#ifndef MIXBUS
- case User:
- bs = UserDown;
- if (tb->value) {
- start_press_timeout (button, id);
- }
- break;
-#endif
case FaderTouch:
fader_is_touched = tb->value;
if (_current_stripable) {
@@ -474,16 +462,6 @@ FaderPort::encoder_handler (MIDI::Parser &, MIDI::pitchbend_t pb)
pan_azimuth (delta);
}
}
-
-#ifndef MIXBUS
- /* if the user button was pressed, mark it as consumed so that its
- * release action has no effect.
- */
-
- if (!Profile->get_mixbus() && (button_state & UserDown)) {
- consumed.insert (User);
- }
-#endif
}
void
@@ -969,7 +947,7 @@ FaderPort::Button::set_action (string const& name, bool when_pressed, FaderPort:
if (name.empty()) {
on_press.erase (bs);
} else {
- DEBUG_TRACE (DEBUG::FaderPort, string_compose ("set button %1 to action %2 on press + %3%4%5\n", id, name, bs));
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose ("set button %1 to action %2 on press + %3\n", id, name, bs));
todo.action_name = name;
on_press[bs] = todo;
}
@@ -977,16 +955,7 @@ FaderPort::Button::set_action (string const& name, bool when_pressed, FaderPort:
if (name.empty()) {
on_release.erase (bs);
} else {
-#ifndef MIXBUS
- if (id == User) {
- /* if the binding is for the User button, we
- need to store the button state as it will be
- seen on button release, which will include UserDown.
- */
- bs = FaderPort::ButtonState (bs|UserDown);
- }
-#endif
- DEBUG_TRACE (DEBUG::FaderPort, string_compose ("set button %1 to action %2 on release + %3%4%5\n", id, name, bs));
+ DEBUG_TRACE (DEBUG::FaderPort, string_compose ("set button %1 to action %2 on release + %3\n", id, name, bs));
todo.action_name = name;
on_release[bs] = todo;
}
@@ -1099,11 +1068,6 @@ FaderPort::Button::get_state () const
state_pairs.push_back (make_pair (string ("shift"), ShiftDown));
state_pairs.push_back (make_pair (string ("long"), LongPress));
-#ifndef MIXBUS
- state_pairs.push_back (make_pair (string ("plain"), UserDown));
- state_pairs.push_back (make_pair (string ("long"), ButtonState (LongPress | UserDown)));
-#endif
-
for (vector<state_pair_t>::const_iterator sp = state_pairs.begin(); sp != state_pairs.end(); ++sp) {
if ((x = on_press.find (sp->second)) != on_press.end()) {
if (x->second.type == NamedAction) {