summaryrefslogtreecommitdiff
path: root/libs/surfaces/generic_midi/midicontrollable.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-30 12:41:10 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-30 12:41:10 +0000
commit8a17b0fb9073bb21ef2c718113f9e41359faf4fe (patch)
tree5f107df91c6412b45c715bf7d47d6318f3a50935 /libs/surfaces/generic_midi/midicontrollable.h
parent59a61c4357b44aa54f03224ae3ba282cf46c0366 (diff)
make generic MIDI control track remote control ID changes; fixup messes in the editor+mixer that caused excessive calls to SyncOrderKey stuff. generic MIDI still doesn't track editor/mixer order changes if we're not syncing both windows
git-svn-id: svn://localhost/ardour2/branches/3.0@6413 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/generic_midi/midicontrollable.h')
-rw-r--r--libs/surfaces/generic_midi/midicontrollable.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/surfaces/generic_midi/midicontrollable.h b/libs/surfaces/generic_midi/midicontrollable.h
index cd42afde56..b5aa115fee 100644
--- a/libs/surfaces/generic_midi/midicontrollable.h
+++ b/libs/surfaces/generic_midi/midicontrollable.h
@@ -42,13 +42,16 @@ class MIDIControllable : public PBD::Stateful
{
public:
MIDIControllable (MIDI::Port&, PBD::Controllable&, bool bistate = false);
- MIDIControllable (MIDI::Port&, const std::string& uri, bool bistate = false);
+ MIDIControllable (MIDI::Port&, bool bistate = false);
virtual ~MIDIControllable ();
+ int init (const std::string&);
+
void rediscover_controllable ();
+ bool bank_relative() const { return _bank_relative; }
+ uint32_t rid() const { return _rid; }
+ std::string what() const { return _what; }
- bool ok() const { return !_current_uri.empty(); }
-
void send_feedback ();
MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, bool force = false);
@@ -64,7 +67,6 @@ class MIDIControllable : public PBD::Stateful
float control_to_midi(float val);
float midi_to_control(float val);
- void set_learned (bool yn) { _learned = yn; }
bool learned() const { return _learned; }
MIDI::Port& get_port() const { return _port; }
@@ -98,8 +100,9 @@ class MIDIControllable : public PBD::Stateful
MIDI::channel_t control_channel;
std::string _control_description;
bool feedback;
-
- void init ();
+ uint32_t _rid;
+ std::string _what;
+ bool _bank_relative;
void midi_receiver (MIDI::Parser &p, MIDI::byte *, size_t);
void midi_sense_note (MIDI::Parser &, MIDI::EventTwoBytes *, bool is_on);