summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTérence Clastres <t.clastres@gmail.com>2018-08-22 22:35:54 +0200
committerTérence Clastres <t.clastres@gmail.com>2018-08-22 22:40:57 +0200
commit6bd81ee3c73b295a0dd2c05e79a16c4e52aaa787 (patch)
treedbb44713eab99b5c20adc47dc3a8f8c1a9cc7710
parent65cadf2cb65bab0c924a89a7df132fbec89f484a (diff)
Revert "LCXL: Fast skip to first/last stripable with left/right long press"
This reverts commit 27b05f4d8dcafa2901c6c60a2c3721017cf642ef.
-rw-r--r--libs/surfaces/launch_control_xl/controllers.cc30
-rw-r--r--libs/surfaces/launch_control_xl/launch_control_xl.h15
2 files changed, 7 insertions, 38 deletions
diff --git a/libs/surfaces/launch_control_xl/controllers.cc b/libs/surfaces/launch_control_xl/controllers.cc
index 4dc1cdaa71..4bcfc32fbc 100644
--- a/libs/surfaces/launch_control_xl/controllers.cc
+++ b/libs/surfaces/launch_control_xl/controllers.cc
@@ -76,18 +76,14 @@ LaunchControlXL::build_maps ()
controller_button = new SelectButton ((i), (cc), (index), (p), (*this)); \
cc_controller_button_map.insert (std::make_pair (controller_button->controller_number(), controller_button)); \
id_controller_button_map.insert (std::make_pair (controller_button->id(), controller_button))
- #define MAKE_SELECT_BUTTON_PRESS_RELEASE_LONG(i,cc,index,p,r,l) \
- controller_button = new SelectButton ((i), (cc), (index), (p), (r), (l), (*this)); \
- cc_controller_button_map.insert (std::make_pair (controller_button->controller_number(), controller_button)); \
- id_controller_button_map.insert (std::make_pair (controller_button->id(), controller_button))
#define MAKE_TRACK_STATE_BUTTON_PRESS(i,nn,index,p) \
note_button = new TrackStateButton ((i), (nn), (index), (p), (*this)); \
nn_note_button_map.insert (std::make_pair (note_button->note_number(), note_button)); \
id_note_button_map.insert (std::make_pair (note_button->id(), note_button))
- #define MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(i,nn,index,p,r,l) \
- note_button = new TrackStateButton ((i), (nn), (index), (p), (r), (l), (*this)); \
- nn_note_button_map.insert (std::make_pair (note_button->note_number(), note_button)); \
- id_note_button_map.insert (std::make_pair (note_button->id(), note_button))
+ #define MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(i,nn,index, p,r,l) \
+ note_button = new TrackStateButton ((i), (nn), (index), (p), (r), (l), (*this)); \
+ nn_note_button_map.insert (std::make_pair (note_button->note_number(), note_button)); \
+ id_note_button_map.insert (std::make_pair (note_button->id(), note_button))
MAKE_TRACK_BUTTON_PRESS(Focus1, 41, 24, YellowLow, &LaunchControlXL::button_track_focus_1);
@@ -109,10 +105,10 @@ LaunchControlXL::build_maps ()
MAKE_SELECT_BUTTON_PRESS(SelectUp, 104, 44, &LaunchControlXL::button_select_up);
MAKE_SELECT_BUTTON_PRESS(SelectDown, 105, 45, &LaunchControlXL::button_select_down);
- MAKE_SELECT_BUTTON_PRESS_RELEASE_LONG(SelectLeft, 106, 46, &LaunchControlXL::relax, &LaunchControlXL::button_select_left, &LaunchControlXL::button_select_left_long_press);
- MAKE_SELECT_BUTTON_PRESS_RELEASE_LONG(SelectRight, 107, 47, &LaunchControlXL::relax, &LaunchControlXL::button_select_right, &LaunchControlXL::button_select_right_long_press);
+ MAKE_SELECT_BUTTON_PRESS(SelectLeft, 106, 46, &LaunchControlXL::button_select_left);
+ MAKE_SELECT_BUTTON_PRESS(SelectRight, 107, 47, &LaunchControlXL::button_select_right);
- MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Device, 105, 40, &LaunchControlXL::relax, &LaunchControlXL::button_device, &LaunchControlXL::button_device_long_press);
+ MAKE_TRACK_STATE_BUTTON_PRESS_RELEASE_LONG(Device, 105, 40, &LaunchControlXL::relax, &LaunchControlXL::button_device, &LaunchControlXL::button_device_long_press);;
MAKE_TRACK_STATE_BUTTON_PRESS(Mute, 106, 41, &LaunchControlXL::button_mute);
MAKE_TRACK_STATE_BUTTON_PRESS(Solo, 107, 42, &LaunchControlXL::button_solo);
MAKE_TRACK_STATE_BUTTON_PRESS(Record, 108, 43, &LaunchControlXL::button_record);
@@ -542,18 +538,6 @@ LaunchControlXL::button_select_right()
}
void
-LaunchControlXL::button_select_left_long_press()
-{
- switch_bank (0);
-}
-
-void
-LaunchControlXL::button_select_right_long_press()
-{
- switch_bank (session->get_stripables().size() - 3);
-}
-
-void
LaunchControlXL::button_select_up()
{
diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.h b/libs/surfaces/launch_control_xl/launch_control_xl.h
index e69dcca392..bfd0bafddc 100644
--- a/libs/surfaces/launch_control_xl/launch_control_xl.h
+++ b/libs/surfaces/launch_control_xl/launch_control_xl.h
@@ -225,12 +225,6 @@ public:
void (LaunchControlXL::*release)())
: Button(id, press, release), _controller_number(cn) {}
- ControllerButton(ButtonID id, uint8_t cn,
- void (LaunchControlXL::*press)(),
- void (LaunchControlXL::*release)(),
- void (LaunchControlXL::*release_long)())
- : Button(id, press, release, release_long), _controller_number(cn) {}
-
uint8_t controller_number() const { return _controller_number; }
@@ -277,13 +271,6 @@ public:
SelectButton(ButtonID id, uint8_t cn, uint8_t index, void (LaunchControlXL::*press)(), LaunchControlXL& l)
: ControllerButton(id, cn, press), LED(index, RedFull, l) {}
- SelectButton(ButtonID id, uint8_t cn, uint8_t index,
- void (LaunchControlXL::*press)(),
- void (LaunchControlXL::*release)(),
- void (LaunchControlXL::*release_long)(),
- LaunchControlXL& l)
- : ControllerButton(id, cn, press, release, release_long), LED(index, RedFull, l) {}
-
MidiByteArray state_msg(bool light) const;
};
@@ -484,8 +471,6 @@ private:
void button_select_down();
void button_select_left();
void button_select_right();
- void button_select_left_long_press();
- void button_select_right_long_press();
void button_track_focus(uint8_t n);
void button_track_control(uint8_t n);