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

◆ create_metro()

MAYAFLUX_API Vruta::SoundRoutine MayaFlux::create_metro ( double  interval_seconds,
std::function< void()>  callback 
)

Creates a simple task that calls a function at a specified interval.

Parameters
interval_secondsTime between calls in seconds
callbackFunction to call on each tick This is conceptually similar to Metronomes in PureData and MaxMSP

Definition at line 30 of file Chronie.cpp.

31{
32 return Kriya::metro(*get_scheduler(), interval_seconds, std::move(callback));
33}
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::metro().

Referenced by schedule_metro().

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