The class will automate a parameter using a trigger from a start value to an end value, using either a preprogrammed function or a user-provided LUT.
More...
#include <LibBasicFunctions.h>
|
| ParameterAutomation () |
| Default constructor.
|
|
| ParameterAutomation (T startValue, T endValue, size_t durationSamples, Function function=Function::LINEAR) |
| Construct an automation object based on duration in audio samples. More...
|
|
| ParameterAutomation (T startValue, T endValue, float durationMilliseconds, Function function=Function::LINEAR) |
| Construct an automation object based on duration in audio samples. More...
|
|
virtual | ~ParameterAutomation () |
| destructor
|
|
void | reconfigure (T startValue, T endValue, size_t durationSamples, Function function=Function::LINEAR) |
| set the start and end values for the automation More...
|
|
void | reconfigure (T startValue, T endValue, float durationMilliseconds, Function function=Function::LINEAR) |
| set the start and end values for the automation More...
|
|
void | trigger () |
| Start the automation from startValue.
|
|
T | getNextValue () |
| Retrieve the next calculated automation value. More...
|
|
bool | isFinished () |
| check if automation is completed More...
|
|
template<typename T>
class Aviate::ParameterAutomation< T >
The class will automate a parameter using a trigger from a start value to an end value, using either a preprogrammed function or a user-provided LUT.
◆ Function
Type of function to control automation.
Enumerator |
---|
NOT_CONFIGURED | Initial, unconfigured stage.
|
HOLD | f(x) = constant
|
LINEAR | f(x) = x
|
EXPONENTIAL | f(x) = exp(-k*x)
|
LOGARITHMIC | f(x) =
|
PARABOLIC | f(x) = x^2
|
LOOKUP_TABLE | f(x) = lut(x)
|
◆ ParameterAutomation() [1/2]
Construct an automation object based on duration in audio samples.
- Parameters
-
startValue | automation will start with this value |
endValue | automation will end on this value |
durationSamples | length of the automation sequence in samples |
function | function to apply in moving from start to end values |
◆ ParameterAutomation() [2/2]
Construct an automation object based on duration in audio samples.
- Parameters
-
startValue | automation will start with this value |
endValue | automation will end on this value |
durationMilliseconds | length of the automation sequence in milliseconds as a float value |
function | function to apply in moving from start to end values |
◆ getNextValue()
Retrieve the next calculated automation value.
- Returns
- the calculated parameter value of templated type T
◆ isFinished()
check if automation is completed
- Returns
- true is automation is finished, false if stil running
◆ reconfigure() [1/2]
set the start and end values for the automation
- Parameters
-
function | select which automation curve (function) to use |
startValue | after reset, parameter automation start from this value |
endValue | after the automation duration, paramter will finish at this value |
durationMilliseconds | number of samples to transition from startValue to endValue |
◆ reconfigure() [2/2]
set the start and end values for the automation
- Parameters
-
function | select which automation curve (function) to use |
startValue | after reset, parameter automation start from this value |
endValue | after the automation duration, paramter will finish at this value |
durationSamples | number of samples to transition from startValue to endValue |
The documentation for this class was generated from the following file: