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

◆ Time() [2/3]

NodeTimeSpec MayaFlux::Kriya::Time ( double  seconds,
std::vector< uint32_t >  channels 
)

Creates a NodeTimeSpec with the specified duration.

Parameters
secondsDuration in seconds
channelsOptional list of channels to activate
channelOptional single channel to activate
Returns
A NodeTimeSpec object representing the specified duration

This factory function creates a NodeTimeSpec with the specified duration, using the global scheduler and graph manager. It's designed to be used with the stream operator to create a fluent, expressive syntax for timed node activation.

Example usage:

// Activate a processing node for 2 seconds
process_node >> Time(2.0);
NodeTimeSpec Time(double seconds)
Definition Operators.cpp:52

This function is part of a broader pattern of using operator overloading to create a domain-specific language for computational flow programming within C++.

Definition at line 62 of file Operators.cpp.

63{
64 return { seconds, channels };
65}