35MAYAFLUX_API std::shared_ptr<Vruta::TaskScheduler>
get_scheduler();
63MAYAFLUX_API
void schedule_metro(
double interval_seconds, std::function<
void()> callback, std::string name =
"");
85MAYAFLUX_API
void schedule_sequence(std::vector<std::pair<
double, std::function<
void()>>> sequence, std::string name =
"");
98MAYAFLUX_API
Vruta::SoundRoutine create_line(
float start_value,
float end_value,
float duration_seconds, uint32_t step_duration = 5,
bool retain =
true);
122MAYAFLUX_API
void schedule_pattern(std::function<std::any(uint64_t)> pattern_func, std::function<
void(std::any)> callback,
double interval_seconds, std::string name =
"");
150MAYAFLUX_API
bool cancel_task(
const std::string& name);
170template <
typename... Args>
196 const std::shared_ptr<Core::Window>& window,
198 std::function<
void()> callback,
199 std::string name =
"");
216 const std::shared_ptr<Core::Window>& window,
218 std::function<
void()> callback,
219 std::string name =
"");
235 const std::shared_ptr<Core::Window>& window,
236 std::function<
void(
IO::Keys)> callback,
237 std::string name =
"");
254 const std::shared_ptr<Core::Window>& window,
256 std::function<
void(
double,
double)> callback,
257 std::string name =
"");
274 const std::shared_ptr<Core::Window>& window,
276 std::function<
void(
double,
double)> callback,
277 std::string name =
"");
293 const std::shared_ptr<Core::Window>& window,
294 std::function<
void(
double,
double)> callback,
295 std::string name =
"");
311 const std::shared_ptr<Core::Window>& window,
312 std::function<
void(
double,
double)> callback,
313 std::string name =
"");
370 std::shared_ptr<Vruta::NetworkSource> source,
372 std::string name =
"");
390 std::string name =
"");
400 std::shared_ptr<Vruta::NetworkSource> source,
401 std::string sender_address,
403 std::string name =
"");
415 std::string sender_address,
417 std::string name =
"");
427 std::shared_ptr<Vruta::NetworkSource> source,
430 std::string name =
"");
444 std::string name =
"");
Platform-agnostic window wrapper.
Coroutine-based execution engine for composable, multi-strategy buffer processing.
Base interface for all computational processing nodes.
Awaitable broadcast message stream for a network endpoint.
A C++20 coroutine-based audio processing task with sample-accurate timing.
Token-based multimodal task scheduling system for unified coroutine processing.
MouseButtons
Enumeration for mouse buttons.
bool cancel_event_handler(const std::string &name)
Cancel an event handler by name.
void on_mouse_move(const std::shared_ptr< Core::Window > &window, std::function< void(double, double)> callback, std::string name)
Schedule a mouse movement handler.
bool update_task_params(const std::string &name, Args... args)
Updates parameters of a scheduled task.
void on_scroll(const std::shared_ptr< Core::Window > &window, std::function< void(double, double)> callback, std::string name)
Schedule a mouse scroll handler.
void schedule_metro(double interval_seconds, std::function< void()> callback, std::string name)
Creates a metronome task and addes it to the default scheduler list for evaluation.
std::shared_ptr< Vruta::EventManager > get_event_manager()
Gets the event manager from the default engine.
bool restart_task(const std::string &name)
Restarts a scheduled task.
Vruta::SoundRoutine create_pattern(std::function< std::any(uint64_t)> pattern_func, std::function< void(std::any)> callback, double interval_seconds)
Schedules a pattern generator that produces values based on a pattern function.
void schedule_sequence(std::vector< std::pair< double, std::function< void()> > > seq, std::string name)
Creates a sequence task that calls functions at specified times and addes it to the default scheduler...
uint64_t seconds_to_samples(double seconds)
Converts a time duration in seconds to the equivalent number of audio samples.
void on_mouse_pressed(const std::shared_ptr< Core::Window > &window, IO::MouseButtons button, std::function< void(double, double)> callback, std::string name)
Schedule a mouse button press handler.
void schedule_task(const std::string &name, Vruta::SoundRoutine &&task, bool initialize)
Schedules a new sound routine task.
void schedule_pattern(std::function< std::any(uint64_t)> pattern_func, std::function< void(std::any)> callback, double interval_seconds, std::string name)
Schedules a pattern generator that produces values based on a pattern function and addes it to the de...
float * get_line_value(const std::string &name)
Gets a pointer to a task's current value.
Vruta::SoundRoutine create_metro(double interval_seconds, std::function< void()> callback)
Creates a simple task that calls a function at a specified interval.
uint64_t seconds_to_blocks(double seconds)
Converts a time duration in seconds to the equivalent number of processing blocks.
void on_key_released(const std::shared_ptr< Core::Window > &window, IO::Keys key, std::function< void()> callback, std::string name)
Schedule a key release handler.
std::shared_ptr< Kriya::BufferPipeline > create_buffer_pipeline()
Creates a new buffer pipeline instance.
bool cancel_task(const std::string &name)
Cancels a scheduled task.
void on_network_message_from(std::shared_ptr< Vruta::NetworkSource > source, std::string sender_address, std::function< void(const Core::NetworkMessage &)> callback, std::string name)
Schedule an on_message_from handler with an existing NetworkSource.
double samples_to_seconds(uint64_t samples)
Converts a number of audio samples to the equivalent time duration in seconds.
void on_mouse_released(const std::shared_ptr< Core::Window > &window, IO::MouseButtons button, std::function< void(double, double)> callback, std::string name)
Schedule a mouse button release handler.
void on_network_message(std::shared_ptr< Vruta::NetworkSource > source, std::function< void(const Core::NetworkMessage &)> callback, std::string name)
Schedule an on_message handler with an existing NetworkSource.
Vruta::SoundRoutine create_line(float start_value, float end_value, float duration_seconds, uint32_t step_duration, bool retain)
Creates a line generator that interpolates between values over time.
Vruta::SoundRoutine create_sequence(std::vector< std::pair< double, std::function< void()> > > seq)
Creates a sequence task that calls functions at specified times.
void on_network_message_matching(std::shared_ptr< Vruta::NetworkSource > source, std::function< bool(const Core::NetworkMessage &)> predicate, std::function< void(const Core::NetworkMessage &)> callback, std::string name)
Schedule an on_message_matching handler with an existing NetworkSource.
uint64_t samples_to_blocks(uint64_t samples)
Converts samples to blocks based on current block size.
std::shared_ptr< Vruta::TaskScheduler > get_scheduler()
Gets the task scheduler from the default engine.
void on_any_key(const std::shared_ptr< Core::Window > &window, std::function< void(IO::Keys)> callback, std::string name)
Schedule a handler for any key press.
void on_key_pressed(const std::shared_ptr< Core::Window > &window, IO::Keys key, std::function< void()> callback, std::string name)
Schedule a key press handler.
Main namespace for the Maya Flux audio engine.
Describes one logical send/receive endpoint managed by a backend.
A received datagram or framed message with sender metadata.