21 #ifndef __ardour_midi_model_h__
22 #define __ardour_midi_model_h__
28 #include <boost/utility.hpp>
29 #include <glibmm/threads.h>
69 const std::string&
name ()
const {
return _name; }
71 virtual void operator() () = 0;
72 virtual void undo () = 0;
74 virtual int set_state (
const XMLNode&,
int version) = 0;
75 virtual XMLNode & get_state () = 0;
102 int set_state (
const XMLNode&,
int version);
106 void remove (
const NotePtr note);
107 void side_effect_remove (
const NotePtr note);
110 change(note, prop,
Variant(new_value));
114 change(note, prop,
Variant(new_time));
120 return !_added_notes.empty() || !_removed_notes.empty();
138 typedef std::list< boost::shared_ptr< Evoral::Note<TimeType> > >
NoteList;
140 const ChangeList&
changes()
const {
return _changes; }
167 int set_state (
const XMLNode&,
int version);
199 int set_state (
const XMLNode &,
int version);
257 void apply_command_as_subcommand (
Session& session,
Command* cmd);
289 void insert_silence_at_start (TimeType);
290 void transpose (TimeType, TimeType,
int);
295 int resolve_overlaps_unlocked (
const NotePtr,
void* arg = 0);
301 , source_lock (slock)
313 friend class DeltaCommand;
320 void control_list_marked_dirty ();
std::list< SysExPtr > _removed
NoteMode note_mode() const
SysExDiffCommand::Property property
const NoteList & removed_notes() const
PBD::ScopedConnectionList _midi_source_connections
void change(const NotePtr note, Property prop, TimeType new_time)
std::list< boost::shared_ptr< Evoral::Note< TimeType > > > NoteList
const NoteList & added_notes() const
LIBEVORAL_API const Beats MaxBeats
boost::shared_ptr< MidiModel > _model
NoteDiffCommand::Property property
InsertMergePolicy _insert_merge_policy
std::list< NoteChange > ChangeList
void set_note_mode(NoteMode mode)
NoteDiffCommand(boost::shared_ptr< MidiModel > m, const std::string &name)
LIBEVORAL_API const Beats MinBeats
PBD::Signal0< void > ContentsChanged
boost::shared_ptr< MidiModel > model() const
bool adds_or_removes() const
const ChangeList & changes() const
std::list< Change > ChangeList
boost::shared_ptr< Evoral::Event< TimeType > > sysex
void change(const NotePtr note, Property prop, uint8_t new_value)
std::list< PatchChangePtr > _added
Glib::Threads::Mutex::Lock * source_lock
std::list< Change > ChangeList
WriteLockImpl(Glib::Threads::Mutex::Lock *slock, Glib::Threads::RWLock &s, Glib::Threads::Mutex &c)
std::set< NotePtr > side_effect_removals
std::list< PatchChangePtr > _removed
int set_state(const XMLNode &)
static LilvNode * get_value(LilvWorld *world, const LilvNode *subject, const LilvNode *predicate)
std::set< WeakNotePtr > & active_notes()
const std::string & name() const
std::set< WeakNotePtr > _active_notes
boost::weak_ptr< MidiSource > _midi_source