diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-21 13:55:49 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:13:36 +0200 |
commit | 8cd8cb165037906d5a35c8e147785845d0f4f808 (patch) | |
tree | 81176c9ed1e90a44953370729a6b0f1091bebe10 /libs/ardour/automation_list.cc | |
parent | d85ce601589451f834b690c3c0da1df66d025700 (diff) |
Temporary session-format compatibility (revert before release)
Saving the new ControlList interpolation methods (enum) breaks loading
the session in older version. The session-format version will
need to be increased.
Until then:
* Fader automation + region gain envelope uses linear fades
* The automation-line visible in the GUI does not match the actual fade
(the y-axis is log/exp-scale, the fade is linear)
* Adding new points on the line is not using the correct initial value
* Custom changes of interpolation mode are not available
Neither of these issues is a regression.
Diffstat (limited to 'libs/ardour/automation_list.cc')
-rw-r--r-- | libs/ardour/automation_list.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc index ae78a217f7..6285de28ea 100644 --- a/libs/ardour/automation_list.cc +++ b/libs/ardour/automation_list.cc @@ -211,6 +211,10 @@ AutomationList::default_interpolation () const case GainAutomation: case BusSendLevel: case EnvelopeAutomation: +#ifndef XXX_NEW_INTERPOLATON__BREAK_SESSION_FORMAT_XXX + /* use old, wrong linear gain interpolation */ + return ControlList::Linear; +#endif return ControlList::Exponential; break; case TrimAutomation: @@ -342,7 +346,22 @@ AutomationList::state (bool full) root->set_property ("automation-id", EventTypeMap::instance().to_symbol(_parameter)); root->set_property ("id", id()); + +#ifndef XXX_NEW_INTERPOLATON__BREAK_SESSION_FORMAT_XXX + /* force new enums to existing ones in session-file */ + Evoral::ControlList::InterpolationStyle is = _interpolation; + switch (is) { + case ControlList::Exponential: + case ControlList::Logarithmic: + is = ControlList::Linear; + break; + default: + break; + } + root->set_property ("interpolation-style", is); +#else root->set_property ("interpolation-style", _interpolation); +#endif if (full) { /* never serialize state with Write enabled - too dangerous @@ -512,6 +531,12 @@ AutomationList::set_state (const XMLNode& node, int version) if (!node.get_property (X_("interpolation-style"), _interpolation)) { _interpolation = default_interpolation (); } +#ifndef XXX_NEW_INTERPOLATON__BREAK_SESSION_FORMAT_XXX + /* internally force logarithmic and Trim params to use Log-scale */ + if (_desc.logarithmic || _parameter.type() == TrimAutomation) { + _interpolation = ControlList::Logarithmic; + } +#endif if (node.get_property (X_("state"), _state)) { if (_state == Write) { |