46 virtual void process(
int num_samples)
override;
71 current_value_ =
value;
115 virtual void process(
int num_samples)
override;
123 current_value_ =
value;
Base class for all signal-processing units in Vital.
Definition processor.h:212
virtual void enable(bool enable)
Enables or disables this Processor.
Definition processor.h:318
A Value processor that smoothly transitions from its current value to a target value.
Definition smooth_value.h:23
void setHard(poly_float value)
Immediately sets the value without smoothing, and updates internal state.
Definition smooth_value.h:68
void linearInterpolate(int num_samples, poly_mask linear_mask)
Performs a linear interpolation if conditions are met for a smoother transition.
Definition smooth_value.cpp:43
virtual void process(int num_samples) override
Processes a block of samples, updating the smoothed value output.
Definition smooth_value.cpp:14
static constexpr mono_float kSmoothCutoff
The cutoff frequency for smoothing, controlling how fast the value settles.
Definition smooth_value.h:26
void set(poly_float value) override
Sets the new target value, enabling the processor and starting the smoothing process.
Definition smooth_value.h:59
SmoothValue(mono_float value=0.0f)
Constructs a new SmoothValue with an initial value.
Definition smooth_value.cpp:12
virtual Processor * clone() const override
Creates a clone of this SmoothValue processor.
Definition smooth_value.h:38
A Processor that maintains and outputs a constant poly_float value.
Definition value.h:24
virtual void set(poly_float value)
Sets the internal value to a new poly_float.
Definition value.cpp:17
poly_float value_
The constant output value.
Definition value.h:69
force_inline mono_float value() const
Returns the current mono_float value of the first lane.
Definition value.h:60
A control-rate version of the SmoothValue that smooths values at control rate instead of audio rate.
Definition smooth_value.h:91
virtual Processor * clone() const override
Creates a clone of this SmoothValue (control-rate) processor.
Definition smooth_value.h:106
static constexpr mono_float kSmoothCutoff
The cutoff frequency for smoothing at control rate.
Definition smooth_value.h:94
virtual void process(int num_samples) override
Processes the control-rate smoothing for the given number of samples.
Definition smooth_value.cpp:64
SmoothValue(mono_float value=0.0f)
Constructs a new SmoothValue (control-rate) with an initial value.
Definition smooth_value.cpp:62
void setHard(mono_float value)
Immediately sets the control-rate value without smoothing, and updates internal state.
Definition smooth_value.h:121
A control-rate variant of the Value processor.
Definition value.h:82
Contains classes and functions used within the Vital synthesizer framework.
float mono_float
Definition common.h:33
Represents a vector of floating-point values using SIMD instructions.
Definition poly_values.h:600
Represents a vector of integer values using SIMD instructions.
Definition poly_values.h:56
Declares Value processors that output a constant value and can be dynamically set.