|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::schedule_pattern | ( | Values | values, |
| Callback | callback, | ||
| Durations | durations, | ||
| std::function< void()> | on_complete, | ||
| std::string | name = "", | ||
| Vruta::ProcessingToken | token = Vruta::ProcessingToken::SAMPLE_ACCURATE ) |
Schedules a typed pattern spaced by durations and runs a function when it is done.
| Index | Step index type, default uint64_t |
| values | Callable from the step index to any value, a range played once, or recurring(range) |
| callback | Callable that takes the generated value, or the range element by reference |
| durations | A list of seconds, a TimeMap, or a callable from a pass number to a range of seconds |
| on_complete | Called once when the pattern ends or is cancelled, or when a task of the same name replaces it |
| name | Name of the pattern task (optional but recommended) |
| token | Processing token to determine which scheduler rate to use (default: SAMPLE_ACCURATE) |
The function is registered before the pattern is scheduled. A range ends the pattern after its last element and that step's wait. It runs on the thread that finishes the routine, the audio thread for the default token, so keep it short. It may schedule or cancel tasks; those take effect on the next drain.
Definition at line 189 of file Chronie.hpp.
References MayaFlux::Kriya::pattern(), MayaFlux::Vruta::SAMPLE_ACCURATE, and schedule_task().