summaryrefslogtreecommitdiff
path: root/libs/ardour/parameter_descriptor.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-04-24 21:41:44 +0200
committerRobin Gareus <robin@gareus.org>2015-04-24 22:37:03 +0200
commit6e66b0e9db35b4db6ea8167cc1b55e780e205512 (patch)
tree48bb892f427a20e35eeaf2966de4c1a5e958f890 /libs/ardour/parameter_descriptor.cc
parent1333b1df1eabfb138fbbaac08432ee7c5d71683d (diff)
define Trim Parameter Type.
Diffstat (limited to 'libs/ardour/parameter_descriptor.cc')
-rw-r--r--libs/ardour/parameter_descriptor.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/parameter_descriptor.cc b/libs/ardour/parameter_descriptor.cc
index 6191500716..67ea267bfa 100644
--- a/libs/ardour/parameter_descriptor.cc
+++ b/libs/ardour/parameter_descriptor.cc
@@ -48,6 +48,11 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter)
upper = Config->get_max_gain();
normal = 1.0f;
break;
+ case TrimAutomation:
+ upper = 10; // +20dB
+ lower = .1; // -20dB
+ normal = 1.0f;
+ break;
case PanAzimuthAutomation:
normal = 0.5f; // there really is no _normal but this works for stereo, sort of
upper = 1.0f;
@@ -116,7 +121,7 @@ ParameterDescriptor::update_steps()
if (unit == ParameterDescriptor::MIDI_NOTE) {
step = smallstep = 1; // semitone
largestep = 12; // octave
- } else if (type == GainAutomation) {
+ } else if (type == GainAutomation || type == TrimAutomation) {
/* dB_coeff_step gives a step normalized for [0, max_gain]. This is
like "slider position", so we convert from "slider position" to gain
to have the correct unit here. */