42MAYAFLUX_API std::shared_ptr<Vruta::TaskScheduler>
get_scheduler();
90MAYAFLUX_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 =
"");
117[[deprecated(
"Pass a std::vector<double> of durations; a single interval is a list of one")]]
173template <std::incrementable Index = u
int64_t,
typename Generator,
typename Callback>
193template <std::incrementable Index = u
int64_t,
typename Generator,
typename Callback,
typename Third>
194 requires Kriya::PatternGenerator<Generator, Index>
195 && Kriya::PatternCallback<Callback, typename Kriya::PatternTraits<Generator, Index>::value_type>
196 && (Kriya::PatternCondition<Third, Index> || Kriya::PatternDurationSource<Third>)
223template <
typename... Args>
243MAYAFLUX_API std::shared_ptr<Kriya::BufferPipeline>
create_buffer_pipeline(std::shared_ptr<IO::IOManager> io_manager);
260 const std::shared_ptr<Core::Window>&
window,
263 std::string
name =
"");
280 const std::shared_ptr<Core::Window>&
window,
283 std::string
name =
"");
299 const std::shared_ptr<Core::Window>&
window,
301 std::string
name =
"");
318 const std::shared_ptr<Core::Window>&
window,
320 std::function<
void(
double,
double)>
callback,
321 std::string
name =
"");
338 const std::shared_ptr<Core::Window>&
window,
340 std::function<
void(
double,
double)>
callback,
341 std::string
name =
"");
357 const std::shared_ptr<Core::Window>&
window,
358 std::function<
void(
double,
double)>
callback,
359 std::string
name =
"");
376 const std::shared_ptr<Core::Window>&
window,
378 std::function<
void(
double,
double)>
callback,
379 std::string
name =
"");
395 const std::shared_ptr<Core::Window>&
window,
396 std::function<
void(
double,
double)>
callback,
397 std::string
name =
"");
454 std::shared_ptr<Vruta::NetworkSource> source,
455 std::function<
void(
const Core::NetworkMessage&)>
callback,
456 std::string
name =
"");
472 const Core::EndpointInfo& info,
473 std::function<
void(
const Core::NetworkMessage&)>
callback,
474 std::string
name =
"");
484 std::shared_ptr<Vruta::NetworkSource> source,
485 std::string sender_address,
486 std::function<
void(
const Core::NetworkMessage&)>
callback,
487 std::string
name =
"");
498 const Core::EndpointInfo& info,
499 std::string sender_address,
500 std::function<
void(
const Core::NetworkMessage&)>
callback,
501 std::string
name =
"");
511 std::shared_ptr<Vruta::NetworkSource> source,
512 std::function<
bool(
const Core::NetworkMessage&)> predicate,
513 std::function<
void(
const Core::NetworkMessage&)>
callback,
514 std::string
name =
"");
525 const Core::EndpointInfo& info,
526 std::function<
bool(
const Core::NetworkMessage&)> predicate,
527 std::function<
void(
const Core::NetworkMessage&)>
callback,
528 std::string
name =
"");
std::weak_ptr< Core::Window > window
Platform-agnostic window wrapper.
Optional orchestration layer for IO reader lifetime and IOService dispatch.
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.
A callable that accepts what the generator returns.
A callable from a step index to a value.
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_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.
void schedule_pattern(std::function< std::any(uint64_t)> pattern_func, std::function< void(std::any)> callback, std::vector< double > durations, std::string name, Vruta::ProcessingToken token)
Schedules a pattern generator whose steps are spaced by a list of durations.
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.