|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API Vruta::SoundRoutine MayaFlux::Kriya::line | ( | Vruta::TaskScheduler & | scheduler, |
| float | start_value, | ||
| float | end_value, | ||
| float | duration_seconds, | ||
| uint32_t | step_duration = 5, |
||
| bool | restartable = false |
||
| ) |
Creates a continuous interpolation generator between two values over time.
| scheduler | The task scheduler that will manage this generator |
| start_value | Initial value of the interpolation |
| end_value | Final value of the interpolation |
| duration_seconds | Total duration of the interpolation in seconds |
| step_duration | Number of samples between value updates (default: 5) |
| restartable | Whether the interpolation can be restarted after completion (default: false) |
The line task generates a linear interpolation between two numerical values over a specified duration. This creates continuous, gradual transitions that can be applied to any parameter in a computational system - from audio parameters to visual properties, physical simulation values, or data transformation coefficients.
The current value of the interpolation is stored in the task's state under the key "current_value" and can be accessed by external code using get_state<float>.
Example usage:
If restartable is true, the interpolation task will remain active after reaching the end value and can be restarted by calling restart() on the SoundRoutine.
Definition at line 31 of file Tasks.cpp.
References MayaFlux::Vruta::TaskScheduler::get_rate().
Referenced by MayaFlux::create_line().
Here is the call graph for this function:
Here is the caller graph for this function: