From 40b555bfbd8a648d8122a5081e0f239767356ac5 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 1 May 2022 16:40:18 +0200 Subject: [PATCH] Document how values work in the Param trait --- src/param.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/param.rs b/src/param.rs index 299a6031..22902c82 100644 --- a/src/param.rs +++ b/src/param.rs @@ -41,7 +41,11 @@ bitflags::bitflags! { } } -/// Describes a single parameter of any type. +/// Describes a single parameter of any type. Most parameter implementations also have a field +/// called `value` that and a field called `smoothed`. The former stores the latest unsmoothed +/// value, and the latter can be used to access the smoother. These two fields should be used in DSP +/// code to either get the parameter's current (smoothed) value. In UI code the getters from this +/// trait should be used instead. pub trait Param: Display { /// The plain parameter type. type Plain: PartialEq;