diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-11 13:03:41 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-11 13:03:41 +0000 |
commit | 02c8ccf348fb16b740089c3ec39053a8b00c1f82 (patch) | |
tree | 12cd938283afdb6401df5f80556937ef97ef0dbf /libs/surfaces/mackie/pot.h | |
parent | 0860570c8cccb50229e5321477a72bce915f7235 (diff) |
move all code to construct MIDI messages into relevant Control/Strip/Surface object; remove MackieMidiBuilder
git-svn-id: svn://localhost/ardour2/branches/3.0@11895 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/pot.h')
-rw-r--r-- | libs/surfaces/mackie/pot.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/libs/surfaces/mackie/pot.h b/libs/surfaces/mackie/pot.h index 767ea6e6df..fc9858e24c 100644 --- a/libs/surfaces/mackie/pot.h +++ b/libs/surfaces/mackie/pot.h @@ -2,25 +2,40 @@ #define __ardour_mackie_control_protocol_pot_h__ #include "controls.h" -#include "ledring.h" namespace Mackie { class Pot : public Control { public: + enum Mode { + dot = 0, + boost_cut = 1, + wrap = 2, + spread = 3, + }; + Pot (int id, std::string name, Group & group) : Control (id, name, group) - , _led_ring (id, name + "_ring", group) {} + , value (0.0) + , mode (dot) + , on (true) {} - virtual type_t type() const { return type_pot; } + MidiByteArray set_mode (Mode); + MidiByteArray set_value (float); + MidiByteArray set_onoff (bool); + MidiByteArray set_all (float, bool, Mode); - virtual const LedRing & led_ring() const {return _led_ring; } + MidiByteArray zero() { return set_value (0.0); } + + MidiByteArray update_message (); static Control* factory (Surface&, int id, const char*, Group&); -private: - LedRing _led_ring; + private: + float value; + Mode mode; + bool on; }; } |