Thin MIDI automation when combining regions #9117

This commit is contained in:
Robin Gareus 2022-12-04 12:12:12 +01:00
parent ddf894a1dd
commit 8f257e1b2e
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -477,6 +477,15 @@ MidiPlaylist::combine (RegionList const & rl, boost::shared_ptr<Track> trk)
remove_region_internal (other, rwl.thawlist);
}
/* thin automation.
* Combining MIDI regions plays back automation, the compound
* will have individual points just like automation was played back
* and recorded. So it has to be thinned it like after a write-pass.
*/
for (auto& l: new_region->model ()->controls()) {
l.second->list()->thin (20);
}
/* write MIDI to disk */
new_region->midi_source (0)->session_saved ();