projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f9a5f87
)
fix pan-width automation
author
Robin Gareus
<robin@gareus.org>
Wed, 15 Jan 2014 19:03:20 +0000
(20:03 +0100)
committer
Robin Gareus
<robin@gareus.org>
Wed, 15 Jan 2014 19:03:20 +0000
(20:03 +0100)
gtk2_ardour/automation_line.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/automation_line.cc
b/gtk2_ardour/automation_line.cc
index 993b4779dd8f4e1cfd55ce57bc67eb35cf762513..c83a8a0f0cb37f0940e6fe4f01a2adc6881ca6de 100644
(file)
--- 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 ||
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;
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 {
} 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() == 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;
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 {
} else if (alist->parameter().type() == PluginAutomation) {
y = (y - alist->get_min_y()) / (double)(alist->get_max_y()- alist->get_min_y());
} else {