diff options
author | Robin Gareus <robin@gareus.org> | 2019-10-07 05:07:55 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-10-07 05:07:55 +0200 |
commit | c663a2d8ef6669054eac817c86d70552580f2138 (patch) | |
tree | ce042183c86193dd130437236f1f6006d45d02ea /libs/ardour/ardour/parameter_descriptor.h | |
parent | 85ea1250e1c5be9b941cd0966127facf871c53ac (diff) |
Invert Pan-Azimuth (up means left)
It's a well established convention that pan y-axis automation,
or vertical uses (top) +1 for left.
This special cases rotary knobs (and horizontal sliders) to retain
a clockwise movement (or movement to the right) for panning to the
right.
Diffstat (limited to 'libs/ardour/ardour/parameter_descriptor.h')
-rw-r--r-- | libs/ardour/ardour/parameter_descriptor.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libs/ardour/ardour/parameter_descriptor.h b/libs/ardour/ardour/parameter_descriptor.h index e0df2f9537..e531133b15 100644 --- a/libs/ardour/ardour/parameter_descriptor.h +++ b/libs/ardour/ardour/parameter_descriptor.h @@ -61,8 +61,12 @@ struct LIBARDOUR_API ParameterDescriptor : public Evoral::ParameterDescriptor * interface value, using settings from Evoral::ParameterDescriptor. * * default for AutomationControl::internal_to_interface (); + * + * @param v the control-value to convert + * @param rotary set to true if the GUI control is a rotary knob + * @return interface value in range 0..1 */ - float to_interface (float) const; + float to_interface (float v, bool rotary = false) const; /** normalized [0..1] to control-value range * @@ -70,8 +74,12 @@ struct LIBARDOUR_API ParameterDescriptor : public Evoral::ParameterDescriptor * using settings from Evoral::ParameterDescriptor. * * default for AutomationControl::interface_to_internal (); + * + * @param v the value in range 0..1 to on convert + * @param rotary set to true if the GUI control is a rotary knob + * @return control-value in range lower..upper */ - float from_interface (float) const; + float from_interface (float v, bool rotary = false) const; bool is_linear () const; float compute_delta (float from, float to) const; |