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

◆ create_pattern()

MAYAFLUX_API Vruta::SoundRoutine MayaFlux::create_pattern ( std::function< std::any(uint64_t)>  pattern_func,
std::function< void(std::any)>  callback,
double  interval_seconds 
)

Schedules a pattern generator that produces values based on a pattern function.

Parameters
pattern_funcFunction that generates pattern values based on step index
callbackFunction to call with each pattern value
interval_secondsTime between pattern steps
Returns
SoundRoutine object representing the scheduled task

Uses the task scheduler from the default engine.

Definition at line 66 of file Chronie.cpp.

67{
68 return Kriya::pattern(*get_scheduler(), std::move(pattern_func), std::move(callback), interval_seconds);
69}
std::shared_ptr< Vruta::TaskScheduler > get_scheduler()
Gets the task scheduler from the default engine.
Definition Chronie.cpp:14

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

Referenced by schedule_pattern().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: