diff options
author | Robin Gareus <robin@gareus.org> | 2015-04-24 21:41:44 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-04-24 22:37:03 +0200 |
commit | 6e66b0e9db35b4db6ea8167cc1b55e780e205512 (patch) | |
tree | 48bb892f427a20e35eeaf2966de4c1a5e958f890 | |
parent | 1333b1df1eabfb138fbbaac08432ee7c5d71683d (diff) |
define Trim Parameter Type.
-rw-r--r-- | libs/ardour/ardour/types.h | 1 | ||||
-rw-r--r-- | libs/ardour/enums.cc | 1 | ||||
-rw-r--r-- | libs/ardour/parameter_descriptor.cc | 7 |
3 files changed, 8 insertions, 1 deletions
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index b0fb9faa9c..4ba6cb3f27 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -139,6 +139,7 @@ namespace ARDOUR { FadeOutAutomation, EnvelopeAutomation, RecEnableAutomation, + TrimAutomation, }; enum AutoState { diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index a674a219fd..bc60dfcb09 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -135,6 +135,7 @@ setup_enum_writer () #define REGISTER_CLASS_ENUM(t,e) i.push_back (t::e); s.push_back (#e) REGISTER_ENUM (GainAutomation); + REGISTER_ENUM (TrimAutomation); REGISTER_ENUM (PanAzimuthAutomation); REGISTER_ENUM (PanElevationAutomation); REGISTER_ENUM (PanWidthAutomation); 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. */ |