configurable midi audition synth
[ardour.git] / libs / ardour / ardour / midi_model.h
index 1479bdc65e819cf0ac44dcdd23c28975df65340d..3ecfca7d1c94d59a257b72998d07da1e9213cbd9 100644 (file)
@@ -25,7 +25,7 @@
 #include <deque>
 #include <utility>
 #include <boost/utility.hpp>
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
 #include "pbd/command.h"
 #include "ardour/types.h"
 #include "ardour/midi_buffer.h"
@@ -114,6 +114,8 @@ public:
                struct NoteChange {
                        NoteDiffCommand::Property property;
                        NotePtr note;
+                       uint32_t note_id; 
+                   
                        union {
                                uint8_t  old_value;
                                TimeType old_time;
@@ -152,6 +154,7 @@ public:
                int set_state (const XMLNode&, int version);
                XMLNode & get_state ();
 
+               void remove (SysExPtr sysex);
                void operator() ();
                void undo ();
 
@@ -160,6 +163,7 @@ public:
        private:
                struct Change {
                        boost::shared_ptr<Evoral::Event<TimeType> > sysex;
+                       gint sysex_id;
                        SysExDiffCommand::Property property;
                        TimeType old_time;
                        TimeType new_time;
@@ -168,6 +172,8 @@ public:
                typedef std::list<Change> ChangeList;
                ChangeList _changes;
 
+               std::list<SysExPtr> _removed;
+
                XMLNode & marshal_change (const Change &);
                Change unmarshal_change (XMLNode *);
        };
@@ -201,6 +207,7 @@ public:
                struct Change {
                        PatchChangePtr patch;
                        Property       property;
+                       gint           patch_id;
                        union {
                                TimeType   old_time;
                                uint8_t    old_channel;
@@ -267,14 +274,14 @@ protected:
 
 private:
        struct WriteLockImpl : public AutomatableSequence<TimeType>::WriteLockImpl {
-               WriteLockImpl(Glib::Mutex::Lock* source_lock, Glib::RWLock& s, Glib::Mutex& c)
+               WriteLockImpl(Glib::Threads::Mutex::Lock* slock, Glib::Threads::RWLock& s, Glib::Threads::Mutex& c)
                        : AutomatableSequence<TimeType>::WriteLockImpl(s, c)
-                       , source_lock(source_lock)
+                       , source_lock (slock)
                {}
                ~WriteLockImpl() {
                        delete source_lock;
                }
-               Glib::Mutex::Lock* source_lock;
+               Glib::Threads::Mutex::Lock* source_lock;
        };
 
 public:
@@ -289,6 +296,8 @@ private:
        void control_list_interpolation_changed (Evoral::Parameter, Evoral::ControlList::InterpolationStyle);
        void automation_list_automation_state_changed (Evoral::Parameter, AutoState);
 
+       void control_list_marked_dirty ();
+
        PBD::ScopedConnectionList _midi_source_connections;
 
        // We cannot use a boost::shared_ptr here to avoid a retain cycle