38MAYAFLUX_API std::shared_ptr<Vruta::TaskScheduler>
get_scheduler();
86MAYAFLUX_API std::shared_ptr<Vruta::SoundRoutine>
schedule_line(
float start_value,
float end_value,
float duration_seconds, uint32_t step_duration = 5,
bool retain =
true, std::string name =
"");
138MAYAFLUX_API
bool cancel_task(
const std::string& name);
154template <
typename... Args>
180 const std::shared_ptr<Core::Window>& window,
182 std::function<
void()> callback,
183 std::string name =
"");
200 const std::shared_ptr<Core::Window>& window,
202 std::function<
void()> callback,
203 std::string name =
"");
219 const std::shared_ptr<Core::Window>& window,
220 std::function<
void(
IO::Keys)> callback,
221 std::string name =
"");
238 const std::shared_ptr<Core::Window>& window,
240 std::function<
void(
double,
double)> callback,
241 std::string name =
"");
258 const std::shared_ptr<Core::Window>& window,
260 std::function<
void(
double,
double)> callback,
261 std::string name =
"");
277 const std::shared_ptr<Core::Window>& window,
278 std::function<
void(
double,
double)> callback,
279 std::string name =
"");
296 const std::shared_ptr<Core::Window>& window,
298 std::function<
void(
double,
double)> callback,
299 std::string name =
"");
315 const std::shared_ptr<Core::Window>& window,
316 std::function<
void(
double,
double)> callback,
317 std::string name =
"");
374 std::shared_ptr<Vruta::NetworkSource> source,
376 std::string name =
"");
394 std::string name =
"");
404 std::shared_ptr<Vruta::NetworkSource> source,
405 std::string sender_address,
407 std::string name =
"");
419 std::string sender_address,
421 std::string name =
"");
431 std::shared_ptr<Vruta::NetworkSource> source,
434 std::string name =
"");
448 std::string name =
"");
Platform-agnostic window wrapper.
Coroutine-based execution engine for composable, multi-strategy buffer processing.
Base interface for all computational processing nodes.
Coroutine resumed when a caller-supplied condition becomes true.
A C++20 coroutine-based graphics processing task with frame-accurate timing.
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.
@ SAMPLE_ACCURATE
Coroutine is sample-accurate.
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 on_mouse_drag(const std::shared_ptr< Core::Window > &window, IO::MouseButtons button, std::function< void(double, double)> callback, std::string name)
Schedule a mouse drag handler.
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.
void schedule_metro(double interval_seconds, std::function< void()> callback, std::string name, Vruta::ProcessingToken token)
Creates a metronome task and addes it to the default scheduler list for evaluation.
void schedule_sequence(std::vector< std::pair< double, std::function< void()> > > seq, std::string name, Vruta::ProcessingToken token)
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_pattern(std::function< std::any(uint64_t)> pattern_func, std::function< void(std::any)> callback, double interval_seconds, std::string name, Vruta::ProcessingToken token)
Schedules a pattern generator that produces values based on a pattern function and addes it to the de...
void schedule_task(const std::string &name, Vruta::SoundRoutine &&task, bool initialize)
Schedules a new sound routine task.
float * get_line_value(const std::string &name)
Gets a pointer to a task's current value.
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.
std::shared_ptr< Vruta::SoundRoutine > schedule_line(float start_value, float end_value, float duration_seconds, uint32_t step_duration, bool retain, std::string name)
Creates a line generator that interpolates between values over time and schedules it for evaluation.
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.
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.