diff options
author | Robin Gareus <robin@gareus.org> | 2019-12-17 17:17:27 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-12-17 17:17:27 +0100 |
commit | f76c897f049e1595871f2d6e73ceeff7eae9f060 (patch) | |
tree | eaab6c60d60dc5c2e879748fb895ef96df6f8d0f /libs/ardour/midi_model.cc | |
parent | 9c6d9324bd6f86309651415a6e948995b9bbe78a (diff) |
Directly apply MIDI automation state changes
Previously "play/off" and "discrete/linear" changes had no effect
until the MIDI playlist was edited and MIDI re-read into RAM.
Diffstat (limited to 'libs/ardour/midi_model.cc')
-rw-r--r-- | libs/ardour/midi_model.cc | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index b3a441db36..c52ac4d2de 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -1684,8 +1684,12 @@ MidiModel::set_midi_source (boost::shared_ptr<MidiSource> s) void MidiModel::source_interpolation_changed (Evoral::Parameter p, Evoral::ControlList::InterpolationStyle s) { - Glib::Threads::Mutex::Lock lm (_control_lock); - control(p)->list()->set_interpolation (s); + { + Glib::Threads::Mutex::Lock lm (_control_lock); + control(p)->list()->set_interpolation (s); + } + /* re-read MIDI */ + ContentsChanged (); /* EMIT SIGNAL */ } /** A ControlList has signalled that its interpolation style has changed. Again, in order to keep @@ -1703,9 +1707,13 @@ MidiModel::control_list_interpolation_changed (Evoral::Parameter p, Evoral::Cont void MidiModel::source_automation_state_changed (Evoral::Parameter p, AutoState s) { - Glib::Threads::Mutex::Lock lm (_control_lock); - boost::shared_ptr<AutomationList> al = boost::dynamic_pointer_cast<AutomationList> (control(p)->list ()); - al->set_automation_state (s); + { + Glib::Threads::Mutex::Lock lm (_control_lock); + boost::shared_ptr<AutomationList> al = boost::dynamic_pointer_cast<AutomationList> (control(p)->list ()); + al->set_automation_state (s); + } + /* re-read MIDI */ + ContentsChanged (); /* EMIT SIGNAL */ } void |