diff options
author | David Robillard <d@drobilla.net> | 2006-07-14 03:43:32 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-07-14 03:43:32 +0000 |
commit | 50a3102b9b533d7f8786d220f8df67421b9227c8 (patch) | |
tree | 669f84631ba1d9a1d312e3f76b226ca938c75c0f /libs/ardour/ardour/panner.h | |
parent | edd841895b873b14c4aa814a80de5dc20ff30618 (diff) |
Merge big changes (mostly Controllable) from trunk
git-svn-id: svn://localhost/ardour2/branches/midi@682 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/panner.h')
-rw-r--r-- | libs/ardour/ardour/panner.h | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index 806f350e03..37c985a2ef 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -27,10 +27,10 @@ #include <iostream> #include <sigc++/signal.h> -#include <midi++/controllable.h> +#include <pbd/stateful.h> +#include <pbd/controllable.h> #include <ardour/types.h> -#include <ardour/stateful.h> #include <ardour/curve.h> using std::istream; @@ -75,24 +75,7 @@ class StreamPanner : public sigc::trackable, public Stateful virtual void set_automation_state (AutoState) = 0; virtual void set_automation_style (AutoStyle) = 0; - /* MIDI control */ - - struct MIDIControl : public MIDI::Controllable { - MIDIControl (StreamPanner&, MIDI::Port *); - void set_value (float); - void send_feedback (gain_t); - MIDI::byte* write_feedback (MIDI::byte* buf, int32_t& bufsize, gain_t val, bool force = false); - - pan_t (*midi_to_pan)(double val); - double (*pan_to_midi)(pan_t p); - - StreamPanner& sp; - bool setting; - gain_t last_written; - }; - - MIDIControl& midi_control() { return _midi_control; } - void reset_midi_control (MIDI::Port *, bool); + PBD::Controllable& control() { return _control; } /* XXX this is wrong. for multi-dimensional panners, there must surely be more than 1 automation curve. @@ -100,7 +83,6 @@ class StreamPanner : public sigc::trackable, public Stateful virtual Curve& automation() = 0; - virtual int load (istream&, string path, uint32_t&) = 0; virtual int save (ostream&) const = 0; @@ -130,12 +112,20 @@ class StreamPanner : public sigc::trackable, public Stateful float effective_z; bool _muted; - MIDIControl _midi_control; - void add_state (XMLNode&); - bool get_midi_node_info (XMLNode * node, MIDI::eventType & ev, MIDI::channel_t & chan, MIDI::byte & additional); - bool set_midi_node_info (XMLNode * node, MIDI::eventType ev, MIDI::channel_t chan, MIDI::byte additional); + struct PanControllable : public PBD::Controllable { + PanControllable (StreamPanner& p) : panner (p) {} + + StreamPanner& panner; + + void set_value (float); + float get_value (void) const; + bool can_send_feedback() const; + }; + PanControllable _control; + + void add_state (XMLNode&); virtual void update () = 0; }; @@ -290,10 +280,6 @@ class Panner : public std::vector<StreamPanner*>, public Stateful, public sigc:: std::vector<Output> outputs; Session& session() const { return _session; } - void reset_midi_control (MIDI::Port *, bool); - void send_all_midi_feedback (); - MIDI::byte* write_midi_feedback (MIDI::byte*, int32_t& bufsize); - enum LinkDirection { SameDirection, OppositeDirection |