- root.add_property ("note-mode", enum_2_string (_note_mode));
- root.add_property ("step-editing", (_step_editing ? "yes" : "no"));
- root.add_property ("input-active", (_input_active ? "yes" : "no"));
+ root.set_property ("note-mode", _note_mode);
+ root.set_property ("step-editing", _step_editing);
+ root.set_property ("input-active", _input_active);
+
+ for (Controls::const_iterator c = _controls.begin(); c != _controls.end(); ++c) {
+ if (boost::dynamic_pointer_cast<MidiTrack::MidiControl>(c->second)) {
+ boost::shared_ptr<AutomationControl> ac = boost::dynamic_pointer_cast<AutomationControl> (c->second);
+ assert (ac);
+ root.add_child_nocopy (ac->get_state ());
+ }
+ }