|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::shared_ptr< Vruta::Routine > MayaFlux::Kriya::sequence | ( | std::vector< std::pair< double, std::function< void()> > > | sequence, |
| Vruta::ProcessingToken | token = Vruta::ProcessingToken::SAMPLE_ACCURATE |
||
| ) |
Creates a temporal sequence that executes callbacks at specified time offsets.
| scheduler | The task scheduler that will manage this sequence |
| sequence | Vector of (time_offset, callback) pairs to execute in order |
| token | Processing token to determine which scheduler rate to use (default: SAMPLE_ACCURATE) |
The sequence task enables the creation of precisely timed event chains with specific temporal relationships. Each event consists of a time offset (in seconds) and a callback function to execute at that precise moment.
This mechanism is valuable for creating structured temporal progressions, algorithmic sequences, or any series of time-based events that require specific timing relationships. The sequence can coordinate events across multiple domains (audio, visual, data) with sample-accurate precision.
Example usage:
The sequence task completes after executing all events in the defined timeline.
Definition at line 36 of file Tasks.cpp.
References MayaFlux::Vruta::FRAME_ACCURATE, MayaFlux::Kriya::FrameDelay::frames_to_wait, MayaFlux::Vruta::seconds_to_frames(), MayaFlux::Vruta::seconds_to_samples(), and sequence().
Referenced by MayaFlux::schedule_sequence(), and sequence().
Here is the call graph for this function:
Here is the caller graph for this function: