Enum nih_plug_vizia::widgets::ParamEvent
source · pub enum ParamEvent<'a, P: Param> {
BeginSetParameter(&'a P),
SetParameter(&'a P, P::Plain),
SetParameterNormalized(&'a P, f32),
EndSetParameter(&'a P),
}
Expand description
An event that updates a parameter’s value. Since NIH-plug manages the parameters, interacting
with parameter values with VIZIA works a little different from updating any other state. These
events are automatically handled by nih_plug_vizia
.
Call the upcast()
method to be able to emit this event through an
[EventContext
][EventContext].
Variants§
BeginSetParameter(&'a P)
Begin an automation gesture for a parameter.
SetParameter(&'a P, P::Plain)
Set a parameter to a new normalized value. This needs to be surrounded by a matching
BeginSetParameter
and EndSetParameter
.
SetParameterNormalized(&'a P, f32)
Set a parameter to a new normalized value. This needs to be surrounded by a matching
BeginSetParameter
and EndSetParameter
.
EndSetParameter(&'a P)
End an automation gesture for a parameter.
Implementations§
source§impl<P: Param> ParamEvent<'_, P>
impl<P: Param> ParamEvent<'_, P>
sourcepub fn upcast(self) -> RawParamEvent
pub fn upcast(self) -> RawParamEvent
Convert this event into a type erased version of itself that can be emitted through
[EventContext::emit()
][EventContext::emit()].
TODO: Think of a better, clearer term for this
Trait Implementations§
source§impl<'a, P: Clone + Param> Clone for ParamEvent<'a, P>where
P::Plain: Clone,
impl<'a, P: Clone + Param> Clone for ParamEvent<'a, P>where P::Plain: Clone,
source§fn clone(&self) -> ParamEvent<'a, P>
fn clone(&self) -> ParamEvent<'a, P>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more