summaryrefslogtreecommitdiff
path: root/libs/surfaces/push2/push2.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-06-17 00:15:55 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-09-27 14:59:29 -0500
commit98335084c70707cbbd07ac5a7248c0998412d815 (patch)
tree5651c75c8ba632a91fe023be011ebd2567501743 /libs/surfaces/push2/push2.h
parent3438003566ddf7e05652f0831a53b70d7cce8c8e (diff)
turn on all buttons that be envisaged as useful in ardour (for now); add support for edit-range-from-playhead ops
Diffstat (limited to 'libs/surfaces/push2/push2.h')
-rw-r--r--libs/surfaces/push2/push2.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/libs/surfaces/push2/push2.h b/libs/surfaces/push2/push2.h
index c50452fc65..2ec73779d4 100644
--- a/libs/surfaces/push2/push2.h
+++ b/libs/surfaces/push2/push2.h
@@ -155,7 +155,7 @@ class Push2 : public ARDOUR::ControlProtocol
struct LED
{
enum State {
- Off,
+ NoTransition,
OneShot24th,
OneShot16th,
OneShot8th,
@@ -174,6 +174,7 @@ class Push2 : public ARDOUR::ControlProtocol
};
enum Colors {
+ Black = 0,
Red = 127,
Green = 126,
Blue = 125,
@@ -182,7 +183,7 @@ class Push2 : public ARDOUR::ControlProtocol
White = 122
};
- LED (uint8_t e) : _extra (e), _color_index (0), _state (Off) {}
+ LED (uint8_t e) : _extra (e), _color_index (0), _state (NoTransition) {}
virtual ~LED() {}
uint8_t extra () const { return _extra; }
@@ -206,7 +207,7 @@ class Push2 : public ARDOUR::ControlProtocol
, x (xx)
, y (yy) {}
- MidiByteArray state_msg () const { return MidiByteArray (3, 0x90|_state, _extra, (_state == Off) ? 0 : _color_index); }
+ MidiByteArray state_msg () const { return MidiByteArray (3, 0x90|_state, _extra, _color_index); }
int coord () const { return (y * 8) + x; }
int note_number() const { return extra(); }
@@ -237,7 +238,7 @@ class Push2 : public ARDOUR::ControlProtocol
, release_method (release)
{}
- MidiByteArray state_msg () const { return MidiByteArray (3, 0xb0|_state, _extra, (_state == Off) ? 0 : _color_index); }
+ MidiByteArray state_msg () const { return MidiByteArray (3, 0xb0|_state, _extra, _color_index); }
int controller_number() const { return extra(); }
ButtonID id;
@@ -277,6 +278,8 @@ class Push2 : public ARDOUR::ControlProtocol
typedef std::map<ButtonID,Button*> IDButtonMap;
IDButtonMap id_button_map;
+ void init_buttons ();
+
/* map of Pads by note number */
typedef std::map<int,Pad*> NNPadMap;
NNPadMap nn_pad_map;
@@ -332,6 +335,8 @@ class Push2 : public ARDOUR::ControlProtocol
void button_metronome ();
void button_repeat ();
void button_solo ();
+ void button_fixed_length ();
+ void button_new ();
/* widgets */