mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
libardour APIs for Sequence::shift (timepos_t const &)
A way to move all MIDI data in a Sequence later in time. This is likely not finished, and may need a new signal for notifications
This commit is contained in:
parent
9c0c3309e6
commit
4ee709af7b
7 changed files with 110 additions and 1 deletions
|
|
@ -1213,6 +1213,23 @@ ControlList::shift (timepos_t const& time, timecnt_t const& distance)
|
|||
maybe_signal_changed ();
|
||||
}
|
||||
|
||||
/* Note: timepos_t is used here instead of timecnt_t because there's an
|
||||
* implicit origin for the magnitude of the distance.
|
||||
*/
|
||||
void
|
||||
ControlList::simple_shift (timepos_t const & distance)
|
||||
{
|
||||
{
|
||||
Glib::Threads::RWLock::WriterLock lm (_lock);
|
||||
for (auto & e : _events) {
|
||||
e->when = e->when + distance;
|
||||
}
|
||||
|
||||
mark_dirty ();
|
||||
}
|
||||
maybe_signal_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
ControlList::modify (iterator iter, timepos_t const& time, double val)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue