From 25efe5953c8903614d574cac3e8c8e8f3d444770 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 2 Dec 2014 19:02:03 -0500 Subject: [PATCH] Fix range of pan controls. Set default range to [0,1] since [0,0] is problematic and useless anyway. --- libs/ardour/parameter_descriptor.cc | 4 +++- libs/evoral/evoral/ParameterDescriptor.hpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/ardour/parameter_descriptor.cc b/libs/ardour/parameter_descriptor.cc index 88debb0200..36f7183134 100644 --- a/libs/ardour/parameter_descriptor.cc +++ b/libs/ardour/parameter_descriptor.cc @@ -50,6 +50,7 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter) break; case PanAzimuthAutomation: normal = 0.5f; // there really is no _normal but this works for stereo, sort of + upper = 1.0f; break; case PanWidthAutomation: lower = -1.0; @@ -57,7 +58,8 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter) normal = 0.0f; break; case RecEnableAutomation: - /* default 0.0 - 1.0 is fine */ + lower = 0.0; + upper = 1.0; toggled = true; break; case PluginAutomation: diff --git a/libs/evoral/evoral/ParameterDescriptor.hpp b/libs/evoral/evoral/ParameterDescriptor.hpp index 0323db1753..5eac28eba9 100644 --- a/libs/evoral/evoral/ParameterDescriptor.hpp +++ b/libs/evoral/evoral/ParameterDescriptor.hpp @@ -27,7 +27,7 @@ struct ParameterDescriptor ParameterDescriptor() : normal(0.0) , lower(0.0) - , upper(0.0) + , upper(1.0) , toggled(false) {}