}
child = node.add_child (X_("FadeIn"));
+ child->add_property ("is-xfade", (_fade_in_is_xfade ? "yes" : "no"));
if (_default_fade_in) {
child->add_property ("default", "yes");
child->add_child_nocopy (_fade_in->get_state ());
}
+ if (_inverse_fade_in) {
+ child = node.add_child (X_("InvFadeIn"));
+ child->add_child_nocopy (_inverse_fade_in->get_state ());
+ }
+
child = node.add_child (X_("FadeOut"));
+ child->add_property ("is-xfade", (_fade_out_is_xfade ? "yes" : "no"));
if (_default_fade_out) {
child->add_property ("default", "yes");
child->add_child_nocopy (_fade_out->get_state ());
}
+ if (_inverse_fade_out) {
+ child = node.add_child (X_("InvFadeOut"));
+ child->add_child_nocopy (_inverse_fade_out->get_state ());
+ }
+
return node;
}
_fade_in->clear ();
- if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) {
+ if (((prop = child->property ("default")) != 0 && string_is_affirmative (prop->value())) || (prop = child->property ("steepness")) != 0) {
set_default_fade_in ();
} else {
XMLNode* grandchild = child->child ("AutomationList");
}
}
+ if ((prop = child->property ("is-xfade")) != 0) {
+ _fade_in_is_xfade = string_is_affirmative (prop->value());
+ } else {
+ _fade_in_is_xfade = false;
+ }
+
if ((prop = child->property ("active")) != 0) {
if (string_is_affirmative (prop->value())) {
set_fade_in_active (true);
_fade_out->clear ();
- if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) {
+ if (((prop = child->property ("default")) != 0 && (string_is_affirmative (prop->value()))) || (prop = child->property ("steepness")) != 0) {
set_default_fade_out ();
} else {
XMLNode* grandchild = child->child ("AutomationList");
}
}
- if ((prop = child->property ("active")) != 0) {
+ if ((prop = child->property ("is-xfade")) != 0) {
+ _fade_out_is_xfade = string_is_affirmative (prop->value());
+ } else {
+ _fade_out_is_xfade = false;
+ }
+
+ if ((prop = child->property ("active")) != 0) {
if (string_is_affirmative (prop->value())) {
set_fade_out_active (true);
} else {
}
}
+ } else if (child->name() == "InvFadeIn") {
+ XMLNode* grandchild = child->child ("AutomationList");
+ if (grandchild) {
+ if (!_inverse_fade_in) {
+ _inverse_fade_in.reset (new AutomationList (Evoral::Parameter (FadeInAutomation)));
+ }
+ _inverse_fade_in->set_state (*grandchild, version);
+ }
+ } else if (child->name() == "InvFadeOut") {
+ XMLNode* grandchild = child->child ("AutomationList");
+ if (grandchild) {
+ if (!_inverse_fade_out) {
+ _inverse_fade_out.reset (new AutomationList (Evoral::Parameter (FadeOutAutomation)));
+ }
+ _inverse_fade_out->set_state (*grandchild, version);
+ }
}
}
_fade_in->freeze ();
*_fade_in = *f;
_fade_in->thaw ();
+ _default_fade_in = false;
send_change (PropertyChange (Properties::fade_in));
}
break;
}
+ _default_fade_in = false;
_fade_in->thaw ();
send_change (PropertyChange (Properties::fade_in));
}
_fade_out->freeze ();
*_fade_out = *f;
_fade_out->thaw ();
+ _default_fade_out = false;
send_change (PropertyChange (Properties::fade_in));
}
break;
}
+ _default_fade_out = false;
_fade_out->thaw ();
send_change (PropertyChange (Properties::fade_in));
}