diff options
-rw-r--r-- | gtk2_ardour/automation_line.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 3 | ||||
-rw-r--r-- | libs/ardour/automation_list.cc | 25 |
3 files changed, 31 insertions, 1 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 9523df2c57..9c1aa13198 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -1168,6 +1168,7 @@ AutomationLine::view_to_model_coord (double& x, double& y) const void AutomationLine::view_to_model_coord_y (double& y) const { +#ifdef XXX_NEW_INTERPOLATON__BREAK_SESSION_FORMAT_XXX if (alist->default_interpolation () != alist->interpolation()) { switch (alist->interpolation()) { case AutomationList::Linear: @@ -1178,6 +1179,7 @@ AutomationLine::view_to_model_coord_y (double& y) const break; } } +#endif y = _desc.from_interface (y); } @@ -1202,6 +1204,7 @@ AutomationLine::apply_delta (double& val, double delta) const void AutomationLine::model_to_view_coord_y (double& y) const { +#ifdef XXX_NEW_INTERPOLATON__BREAK_SESSION_FORMAT_XXX if (alist->default_interpolation () != alist->interpolation()) { switch (alist->interpolation()) { case AutomationList::Linear: @@ -1212,6 +1215,7 @@ AutomationLine::model_to_view_coord_y (double& y) const break; } } +#endif y = _desc.to_interface (y); } diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 5e1395ff65..011c53997f 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -624,7 +624,7 @@ AutomationTimeAxisView::build_display_menu () items.push_back (MenuElem (_("Mode"), *auto_mode_menu)); } else { - +#ifdef XXX_NEW_INTERPOLATON__BREAK_SESSION_FORMAT_XXX Menu* auto_mode_menu = manage (new Menu); auto_mode_menu->set_name ("ArdourContextMenu"); MenuList& am_items = auto_mode_menu->items(); @@ -664,6 +664,7 @@ AutomationTimeAxisView::build_display_menu () delete auto_mode_menu; auto_mode_menu = 0; } +#endif } /* make sure the automation menu state is correct */ 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) { |