From: Robin Gareus Date: Wed, 15 Jan 2014 19:03:20 +0000 (+0100) Subject: fix pan-width automation X-Git-Tag: 3.5.308~46 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=79b56b1d3319d03d14b2d3e2f8d6cd7b3e797deb;hp=f9a5f8700332e71e9647a83626e5a37409d6e2a8;p=ardour.git fix pan-width automation --- diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 993b4779dd..c83a8a0f0c 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -1122,9 +1122,10 @@ AutomationLine::view_to_model_coord_y (double& y) const y = max (0.0, y); y = min (2.0, y); } else if (alist->parameter().type() == PanAzimuthAutomation || - alist->parameter().type() == PanElevationAutomation || - alist->parameter().type() == PanWidthAutomation) { + alist->parameter().type() == PanElevationAutomation) { y = 1.0 - y; + } else if (alist->parameter().type() == PanWidthAutomation) { + y = 2.0 * y - 1.0; } else if (alist->parameter().type() == PluginAutomation) { y = y * (double)(alist->get_max_y()- alist->get_min_y()) + alist->get_min_y(); } else { @@ -1140,10 +1141,10 @@ AutomationLine::model_to_view_coord (double& x, double& y) const alist->parameter().type() == EnvelopeAutomation) { y = gain_to_slider_position_with_max (y, Config->get_max_gain()); } else if (alist->parameter().type() == PanAzimuthAutomation || - alist->parameter().type() == PanElevationAutomation || - alist->parameter().type() == PanWidthAutomation) { - // vertical coordinate axis reversal + alist->parameter().type() == PanElevationAutomation) { y = 1.0 - y; + } else if (alist->parameter().type() == PanWidthAutomation) { + y = .5 + y * .5; } else if (alist->parameter().type() == PluginAutomation) { y = (y - alist->get_min_y()) / (double)(alist->get_max_y()- alist->get_min_y()); } else {