- sigc::signal<void> ContentsChanged;
-
- const MidiSource* midi_source() const { return _midi_source; }
- void set_midi_source(MidiSource* source) { _midi_source = source; }
-
+ PBD::Signal0<void> ContentsChanged;
+
+ boost::shared_ptr<const MidiSource> midi_source ();
+ void set_midi_source (boost::shared_ptr<MidiSource>);
+
+ boost::shared_ptr<Evoral::Note<TimeType> > find_note (NotePtr);
+ PatchChangePtr find_patch_change (Evoral::event_id_t);
+ boost::shared_ptr<Evoral::Note<TimeType> > find_note (gint note_id);
+ boost::shared_ptr<Evoral::Event<TimeType> > find_sysex (gint);
+
+ InsertMergePolicy insert_merge_policy () const;
+ void set_insert_merge_policy (InsertMergePolicy);
+
+ boost::shared_ptr<Evoral::Control> control_factory(const Evoral::Parameter& id);
+
+ void insert_silence_at_start (TimeType);
+ void transpose (TimeType, TimeType, int);
+
+protected:
+ int resolve_overlaps_unlocked (const NotePtr, void* arg = 0);
+
+private:
+ struct WriteLockImpl : public AutomatableSequence<TimeType>::WriteLockImpl {
+ WriteLockImpl(Glib::Mutex::Lock* source_lock, Glib::RWLock& s, Glib::Mutex& c)
+ : AutomatableSequence<TimeType>::WriteLockImpl(s, c)
+ , source_lock(source_lock)
+ {}
+ ~WriteLockImpl() {
+ delete source_lock;
+ }
+ Glib::Mutex::Lock* source_lock;
+ };
+
+public:
+ WriteLock edit_lock();
+ WriteLock write_lock();
+