MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Nodes Namespace Reference

Contains the node-based computational processing system components. More...

Namespaces

namespace  detail
 
namespace  Filters
 
namespace  Generator
 
namespace  GpuSync
 
namespace  Input
 
namespace  Network
 

Classes

class  BinaryOpContext
 Specialized context for binary operation callbacks. More...
 
class  BinaryOpContextGpu
 GPU-compatible context for binary operation callbacks. More...
 
class  BinaryOpNode
 Combines the outputs of two nodes using a binary operation. More...
 
class  ChainNode
 Connects an ordered sequence of nodes in series. More...
 
class  CompositeOpContext
 Context for N-ary composite operation callbacks. More...
 
class  CompositeOpContextGpu
 GPU-compatible context for composite operation callbacks. More...
 
class  CompositeOpNode
 Combines the outputs of N nodes using a composite operation. More...
 
class  Constant
 Zero-overhead scalar source node that emits a fixed value on every tick. More...
 
class  GpuMatrixData
 GPU-uploadable 2D grid data interface. More...
 
class  GpuStructuredData
 GPU-uploadable structured data (arrays of POD structs) More...
 
class  GpuVectorData
 GPU-uploadable 1D array data interface. More...
 
struct  LineVertex
 Vertex type for line primitives (LINE_LIST / LINE_STRIP topology) More...
 
struct  MeshVertex
 Vertex type for indexed triangle mesh primitives (TRIANGLE_LIST topology) More...
 
class  Node
 Base interface for all computational processing nodes. More...
 
struct  NodeConfig
 Configuration settings for individual audio nodes. More...
 
class  NodeContext
 Base context class for node callbacks. More...
 
class  NodeGraphManager
 Central manager for the computational processing node graph. More...
 
struct  PointVertex
 Vertex type for point primitives (POINT_LIST topology) More...
 
class  RootNode
 Container for top-level nodes in a processing channel with multi-modal support. More...
 
struct  RoutingState
 Represents the state of routing transitions for a node. More...
 
class  StreamReaderNode
 Node that reads sample-by-sample from externally provided data. More...
 
struct  TextureQuadVertex
 Vertex layout for textured quad geometry (position + UV). More...
 

Typedefs

using NodeCondition = std::function< bool(NodeContext &)>
 Predicate function type for conditional callbacks.
 
using NodeHook = TypedHook<>
 Alias for TypedHook<NodeContext>.
 
using TokenChannelProcessor = std::function< std::vector< double >(RootNode *, uint32_t)>
 
using TokenSampleProcessor = std::function< double(RootNode *, uint32_t)>
 
template<typename ContextT = NodeContext>
using TypedHook = std::function< void(ContextT &)>
 Callback function type for node processing events, parameterised on context type.
 

Enumerations

enum  NodeBinaryOpSemantics : uint8_t { REPLACE , KEEP }
 
enum  NodeCapability : uint8_t { SCALAR = 1U << 0 , VECTOR = 1U << 1 , MATRIX = 1U << 2 , STRUCTURED = 1U << 3 }
 Bitmask flags declaring what data shapes a node's context can produce. More...
 
enum  NodeChainSemantics : uint8_t { REPLACE_TARGET , PRESERVE_BOTH , ONLY_CHAIN }
 Defines how to handle existing nodes when creating a new chain. More...
 
enum  NodeState : uint32_t {
  INACTIVE = 0x00 , ACTIVE = 0x01 , PENDING_REMOVAL = 0x02 , MOCK_PROCESS = 0x04 ,
  PROCESSED = 0x08 , ENGINE_PROCESSED = ACTIVE | PROCESSED , EXTERMAL_PROCESSED = INACTIVE | PROCESSED , ENGINE_MOCK_PROCESSED = ACTIVE | MOCK_PROCESS | PROCESSED
}
 Represents the processing state of a node in the audio graph. More...
 
enum class  ProcessingToken { AUDIO_RATE , VISUAL_RATE , EVENT_RATE , CUSTOM_RATE }
 Enumerates the different processing domains for nodes. More...
 

Functions

void atomic_add_flag (std::atomic< NodeState > &state, NodeState flag)
 Atomically adds a flag to a node state.
 
void atomic_dec_modulator_count (std::atomic< uint32_t > &count, int amount)
 Atomically decrements the modulator count by a specified amount.
 
void atomic_inc_modulator_count (std::atomic< uint32_t > &count, int amount)
 Atomically increments the modulator count by a specified amount.
 
void atomic_remove_flag (std::atomic< NodeState > &state, NodeState flags)
 Atomically removes a flag from a node state.
 
void atomic_set_flag_strong (std::atomic< NodeState > &flag, const NodeState &desired)
 Atomically sets a node state flag to a specific value.
 
void atomic_set_flag_weak (std::atomic< NodeState > &flag, NodeState &expected, const NodeState &desired)
 Atomically sets a node state flag with weak memory ordering.
 
void atomic_set_strong (std::atomic< NodeState > &flag, NodeState &expected, const NodeState &desired)
 Atomically sets a node state flag with strong memory ordering.
 
template<typename ContextT >
bool callback_exists (const std::vector< TypedHook< ContextT > > &callbacks, const TypedHook< ContextT > &callback)
 Returns true if an equivalent callback is already present in the collection.
 
bool callback_pair_exists (const std::vector< std::pair< NodeHook, NodeCondition > > &callbacks, const NodeHook &callback, const NodeCondition &condition)
 Returns true if the exact callback+condition pair is already present.
 
bool conditional_callback_exists (const std::vector< std::pair< NodeHook, NodeCondition > > &callbacks, const NodeCondition &callback)
 Returns true if a condition function is already present in a conditional callback collection.
 
std::vector< uint32_t > get_active_channels (const std::shared_ptr< Nodes::Node > &node, uint32_t fallback_channel=0)
 Extracts active channel list from a node's channel mask.
 
std::vector< uint32_t > get_active_channels (uint32_t channel_mask, uint32_t fallback_channel=0)
 Extracts active channel list from a channel mask.
 
template<typename ContextT >
bool safe_add_callback (std::vector< TypedHook< ContextT > > &callbacks, const TypedHook< ContextT > &callback)
 Adds a callback to the collection if an equivalent one is not already present.
 
bool safe_add_conditional_callback (std::vector< std::pair< NodeHook, NodeCondition > > &callbacks, const NodeHook &callback, const NodeCondition &condition)
 Adds a conditional callback if the exact pair is not already present.
 
template<typename ContextT >
bool safe_remove_callback (std::vector< TypedHook< ContextT > > &callbacks, const TypedHook< ContextT > &callback)
 Removes all callbacks whose target_type() matches that of the supplied callback.
 
bool safe_remove_conditional_callback (std::vector< std::pair< NodeHook, NodeCondition > > &callbacks, const NodeCondition &callback)
 Removes all conditional callbacks whose condition target_type() matches.
 
void try_reset_processed_state (std::shared_ptr< Node > node)
 Attempts to reset the processed state of a node.
 
void update_routing_state (RoutingState &state)
 Updates the routing state for a node based on its current channel usage.
 
template<typename T >
Kakshya::VertexLayout vertex_layout_for ()
 Deduce a VertexLayout from a vertex struct type.
 

Variables

constexpr uint32_t MAX_CHANNEL_COUNT = 32
 Hard limit imposed by uint32_t channel mask width.
 

Detailed Description

Contains the node-based computational processing system components.

The Nodes namespace provides a flexible, composable processing architecture based on the concept of interconnected computational nodes. Each node represents a discrete transformation unit that can be connected to other nodes to form complex processing networks and computational graphs.