|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| std::shared_ptr< Vruta::Routine > MayaFlux::Kriya::pattern | ( | Generator | generator, |
| Callback | callback, | ||
| std::vector< double > | durations, | ||
| Vruta::ProcessingToken | token = Vruta::ProcessingToken::SAMPLE_ACCURATE |
||
| ) |
Creates a pattern whose steps are spaced by a list of durations.
| Index | Step index type, default uint64_t |
| generator | Callable from the step index to any value |
| callback | Callable that takes the generated value |
| durations | Seconds to wait after each step, stepped through in order and repeated |
| token | Selects the routine type that runs the pattern |
The first step runs at once. After step i the routine waits durations[i % size], rounded to the routine's own units and never less than one unit. A single interval is a list of one: pattern(gen, cb, { 0.125 }). A throw from the generator or callback is logged and ends the pattern.