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

◆ schedule_pattern() [1/4]

template<std::incrementable Index = uint64_t, typename Generator , typename Callback >
requires Kriya::PatternGenerator<Generator, Index> && Kriya::PatternCallback<Callback, typename Kriya::PatternTraits<Generator, Index>::value_type>
void MayaFlux::schedule_pattern ( Generator  generator,
Callback  callback,
std::vector< double >  durations,
std::string  name = "",
Vruta::ProcessingToken  token = Vruta::ProcessingToken::SAMPLE_ACCURATE 
)

Schedules a typed pattern whose steps are spaced by a list of durations.

Template Parameters
IndexStep index type, default uint64_t
Parameters
generatorCallable from the step index to any value
callbackCallable that takes the generated value
durationsSeconds to wait after each step, stepped through in order and repeated
nameName of the pattern task (optional but recommended)
tokenProcessing token to determine which scheduler rate to use (default: SAMPLE_ACCURATE)

The value type is whatever the generator returns, so no std::any is involved. schedule_pattern(gen, cb, { 0.25, 0.5 }) selects this overload.

Definition at line 176 of file Chronie.hpp.

177{
178 schedule_task(name, Kriya::pattern<Index>(std::move(generator), std::move(callback), std::move(durations), token));
179}
PickCallback callback
Definition Picker.cpp:22
std::string name
Definition VKDevice.cpp:123
void schedule_task(const std::string &name, Vruta::SoundRoutine &&task, bool initialize)
Schedules a new sound routine task.
Definition Chronie.cpp:104

References callback, name, and schedule_task().

+ Here is the call graph for this function: