27 #include <glibmm/threads.h>
28 #include <glibmm/fileutils.h>
29 #include <glibmm/miscutils.h>
71 MidiRegion::register_properties ()
87 assert(
_name.
val().find(
"/") == string::npos);
99 assert(
_name.
val().find(
"/") == string::npos);
118 assert(
_name.
val().find(
"/") == string::npos);
135 assert (!path.empty());
136 assert (!Glib::file_test (path, Glib::FILE_TEST_EXISTS));
140 return clone (newsrc);
154 if (
midi_source(0)->write_to (lm, newsrc, bbegin, bend)) {
241 return _read_at (
_sources, out, position, dur, chan_n, mode, tracker, filter);
280 if (internal_offset >=
_length) {
284 if ((to_read = min (dur,
_length - internal_offset)) == 0) {
368 return model()->control(
id, create);
374 return model()->control(
id);
409 for (Automatable::Controls::const_iterator i = c.begin(); i != c.end(); ++i) {
418 midi_source()->AutomationStateChanged.connect_same_thread (
456 model()->insert_silence_at_start (c.from (-
_start));
ARDOUR::Session & _session
virtual framecnt_t midi_read(const Lock &lock, Evoral::EventSink< framepos_t > &dst, framepos_t source_start, framepos_t start, framecnt_t cnt, MidiStateTracker *tracker, MidiChannelFilter *filter, const std::set< Evoral::Parameter > &filtered) const
framecnt_t read_at(Evoral::EventSink< framepos_t > &dst, framepos_t position, framecnt_t dur, uint32_t chan_n=0, NoteMode mode=Sustained, MidiStateTracker *tracker=0, MidiChannelFilter *filter=0) const
Glib::Threads::Mutex::Lock Lock
void register_properties()
LIBARDOUR_API PBD::PropertyDescriptor< layer_t > layer
shared_ptr< T > dynamic_pointer_cast(shared_ptr< U > const &r)
LIBARDOUR_API PBD::PropertyDescriptor< std::string > name
void post_set(const PBD::PropertyChange &)
boost::shared_ptr< MidiRegion > clone(std::string path=std::string()) const
void update_length_beats()
MidiRegion(const SourceList &)
boost::shared_ptr< Source > source(uint32_t n=0) const
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > start
framecnt_t _read_at(const SourceList &, Evoral::EventSink< framepos_t > &dst, framepos_t position, framecnt_t dur, uint32_t chan_n=0, NoteMode mode=Sustained, MidiStateTracker *tracker=0, MidiChannelFilter *filter=0) const
framecnt_t frame_rate() const
boost::shared_ptr< Evoral::Control > control(const Evoral::Parameter &id, bool create=false)
void update_after_tempo_map_change()
framepos_t framepos_minus_beats(framepos_t, Evoral::Beats) const
virtual void update_after_tempo_map_change()
SourceList _master_sources
virtual int set_state(const XMLNode &, int version)
void set_start_beats_from_start_frames()
PBD::Property< framepos_t > _start
virtual void set_position_internal(framepos_t pos, bool allow_bbt_recompute)
void post_set(const PBD::PropertyChange &)
AutoState automation_state() const
std::set< Evoral::Parameter > _filtered_parameters
parameters that we ask our source not to return when reading
std::vector< boost::shared_ptr< Source > > SourceList
LIBARDOUR_API PBD::PropertyDescriptor< Evoral::Beats > start_beats
#define DEBUG_TRACE(bits, str)
LIBARDOUR_API void make_property_quarks()
RouteGroup::RouteGroup(Session &s, const string &n) add_property(_relative)
PBD::Property< std::string > _name
std::map< Parameter, boost::shared_ptr< Control > > Controls
PBD::ScopedConnection _model_connection
const Parameter & parameter() const
framepos_t position() const
LIBPBD_API uint64_t Properties
framecnt_t master_read_at(MidiRingBuffer< framepos_t > &dst, framepos_t position, framecnt_t dur, uint32_t chan_n=0, NoteMode mode=Sustained) const
void recompute_at_start()
Glib::Threads::Mutex & mutex()
LIBPBD_API Glib::ustring basename_nosuffix(Glib::ustring)
int set_state(const XMLNode &, int version)
virtual XMLNode & state()
PBD::ScopedConnection _source_connection
LIBARDOUR_API PBD::PropertyDescriptor< Evoral::Beats > length_beats
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > position
virtual void set_start_internal(framecnt_t)
void send_change(const PBD::PropertyChange &)
LIBEVORAL_API uint64_t Beats
boost::shared_ptr< AutomationList > alist() const
bool contains(PropertyDescriptor< T > p) const
void model_automation_state_changed(Evoral::Parameter const &)
boost::shared_ptr< MidiSource > midi_source(uint32_t n=0) const
void fix_negative_start()
PBD::Property< Evoral::Beats > _length_beats
int separate_by_channel(ARDOUR::Session &, std::vector< boost::shared_ptr< Region > > &) const
virtual void set_length_internal(framecnt_t)
PBD::Property< Evoral::Beats > _start_beats
void set_note_mode(const Glib::Threads::Mutex::Lock &lock, NoteMode mode)
static boost::shared_ptr< Region > create(boost::shared_ptr< const Region > other, bool announce=false)
bool add(PropertyBase *prop)
LIBARDOUR_API PBD::PropertyDescriptor< bool > whole_file
boost::shared_ptr< MidiModel > model()
static boost::shared_ptr< Source > createWritable(DataType type, Session &, const std::string &path, bool destructive, framecnt_t rate, bool announce=true, bool async=false)
void set_position_internal(framepos_t pos, bool allow_bbt_recompute)
std::string string_compose(const std::string &fmt, const T1 &o1)
void set_length_internal(framecnt_t len)
PBD::Property< framepos_t > _position
PBD::Property< framecnt_t > _length
LIBARDOUR_API PBD::PropertyDescriptor< framecnt_t > length
void set_start_internal(framecnt_t)