- boost::shared_ptr<MidiSource> clone (const std::string& path,
- Evoral::MusicalTime begin = Evoral::MinMusicalTime,
- Evoral::MusicalTime end = Evoral::MaxMusicalTime);
+ /** Write the data in the given time range to another MidiSource
+ * \param newsrc MidiSource to which data will be written. Should be a
+ * new, empty source. If it already has contents, the results are
+ * undefined. Source must be writable.
+ * \param begin time of earliest event that can be written.
+ * \param end time of latest event that can be written.
+ * \return zero on success, non-zero if the write failed for any reason.
+ */
+ int write_to (const Lock& lock,
+ boost::shared_ptr<MidiSource> newsrc,
+ Evoral::Beats begin = Evoral::MinBeats,
+ Evoral::Beats end = Evoral::MaxBeats);