diff options
author | Robin Gareus <robin@gareus.org> | 2016-12-07 19:47:04 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-12-07 19:47:04 +0100 |
commit | 295562dd52deae1ccf0594f574c44c95677abf27 (patch) | |
tree | 26516723c6f687fae7d8d0cbca9bc2ffc948cc40 /libs/ardour/route.cc | |
parent | d7660957325bdebbb75f21c0d19b9f0aad6e7f37 (diff) |
Save/Restore MIDI Automation Controls (current CC, PGM)
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r-- | libs/ardour/route.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 0772361e6a..6b16867e59 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -46,6 +46,7 @@ #include "ardour/capturing_processor.h" #include "ardour/debug.h" #include "ardour/delivery.h" +#include "ardour/event_type_map.h" #include "ardour/gain_control.h" #include "ardour/internal_return.h" #include "ardour/internal_send.h" @@ -2473,6 +2474,14 @@ Route::set_state (const XMLNode& node, int version) _mute_control->set_state (*child, version); } else if (prop->value() == _phase_control->name()) { _phase_control->set_state (*child, version); + } else { + Evoral::Parameter p = EventTypeMap::instance().from_symbol (prop->value()); + if (p.type () >= MidiCCAutomation && p.type () < MidiSystemExclusiveAutomation) { + boost::shared_ptr<AutomationControl> ac = automation_control (p, true); + if (ac) { + ac->set_state (*child, version); + } + } } } else if (child->name() == MuteMaster::xml_node_name) { _mute_master->set_state (*child, version); |