|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| std::shared_ptr< Vruta::Routine > MayaFlux::Kriya::pattern | ( | Generator | generator, |
| Callback | callback, | ||
| Source | durations, | ||
| Vruta::ProcessingToken | token = Vruta::ProcessingToken::SAMPLE_ACCURATE |
||
| ) |
Creates a pattern whose durations come from a function that returns an array per pass.
| Index | Step index type, default uint64_t |
| generator | Callable from the step index to any value |
| callback | Callable that takes the generated value |
| durations | Callable from a pass number to a range of seconds |
| token | Selects the routine type that runs the pattern |
The function is called with 0 for the first pass and again, with the next number, each time the array it returned has been used up. Durations are stepped through one per step. An empty array, or a throw from the function, ends the pattern after the step that asked for it. This lets the gaps change from pass to pass.