MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ schedule_line()

MAYAFLUX_API std::shared_ptr< Vruta::SoundRoutine > MayaFlux::schedule_line ( float  start_value,
float  end_value,
float  duration_seconds,
uint32_t  step_duration = 5,
bool  retain = true,
std::string  name = "" 
)

Creates a line generator that interpolates between values over time and schedules it for evaluation.

Parameters
start_valueStarting value
end_valueEnding value
duration_secondsTotal duration in seconds
step_durationTime between steps in seconds
retainWhether the coroutine should stay alive for potential restarts (default: true)
nameName of the line task (optional but recommended). If not provided, a default name will be generated.
Returns
shared_ptr to SoundRoutine object representing the line generator

Uses the task scheduler from the default engine.

Definition at line 61 of file Chronie.cpp.

62{
63 auto scheduler = get_scheduler();
64 if (name.empty()) {
65 name = "seq_" + std::to_string(scheduler->get_next_task_id());
66 }
67
68 auto line = std::make_shared<Vruta::SoundRoutine>(Kriya::line(start_value, end_value, duration_seconds, step_duration, retain));
69
70 get_scheduler()->add_task(line, name, true);
71 return line;
72}
std::shared_ptr< Vruta::TaskScheduler > get_scheduler()
Gets the task scheduler from the default engine.
Definition Chronie.cpp:22

References get_scheduler(), and MayaFlux::Kriya::line().

+ Here is the call graph for this function: