summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/parameter_descriptor.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/parameter_descriptor.h')
-rw-r--r--libs/ardour/ardour/parameter_descriptor.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/ardour/parameter_descriptor.h b/libs/ardour/ardour/parameter_descriptor.h
index c95b028aaa..87363bb2c3 100644
--- a/libs/ardour/ardour/parameter_descriptor.h
+++ b/libs/ardour/ardour/parameter_descriptor.h
@@ -77,6 +77,17 @@ struct LIBARDOUR_API ParameterDescriptor : public Evoral::ParameterDescriptor
float compute_delta (float from, float to) const;
float apply_delta (float value, float delta) const;
+ /* find the closest scale-point, return the internal value of
+ * the prev/next scale-point (no wrap-around)
+ *
+ * If the given parameter is not en enum, the given val is returned.
+ *
+ * @param val internal (not interface) value
+ * @param prev if true, step to prev scale-point, otherwise next
+ * @return internal value, suitable for set_value()
+ */
+ float step_enum (float val, bool prev) const;
+
/** Set step, smallstep, and largestep, based on current description. */
void update_steps();