MayaFlux 0.3.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
 
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
 
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 TokenChannelProcessor = std::function< std::vector< double >(RootNode *, uint32_t)>
 
using TokenSampleProcessor = std::function< double(RootNode *, uint32_t)>
 
using NodeHook = std::function< void(NodeContext &)>
 Callback function type for node processing events.
 
using NodeCondition = std::function< bool(NodeContext &)>
 Predicate function type for conditional callbacks.
 

Enumerations

enum class  ProcessingToken { AUDIO_RATE , VISUAL_RATE , EVENT_RATE , CUSTOM_RATE }
 Enumerates the different processing domains for nodes. More...
 
enum  NodeChainSemantics : uint8_t { REPLACE_TARGET , PRESERVE_BOTH , ONLY_CHAIN }
 Defines how to handle existing nodes when creating a new chain. More...
 
enum  NodeBinaryOpSemantics : uint8_t { REPLACE , KEEP }
 
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  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...
 

Functions

bool callback_exists (const std::vector< NodeHook > &callbacks, const NodeHook &callback)
 Checks if a callback function already exists in a collection.
 
bool conditional_callback_exists (const std::vector< std::pair< NodeHook, NodeCondition > > &callbacks, const NodeCondition &callback)
 Checks if a condition function already exists in a collection of conditional callbacks.
 
bool callback_pair_exists (const std::vector< std::pair< NodeHook, NodeCondition > > &callbacks, const NodeHook &callback, const NodeCondition &condition)
 Checks if a specific callback and condition pair already exists.
 
bool safe_add_callback (std::vector< NodeHook > &callbacks, const NodeHook &callback)
 Safely adds a callback to a collection if it doesn't already exist.
 
bool safe_add_conditional_callback (std::vector< std::pair< NodeHook, NodeCondition > > &callbacks, const NodeHook &callback, const NodeCondition &condition)
 Safely adds a conditional callback if it doesn't already exist.
 
bool safe_remove_callback (std::vector< NodeHook > &callbacks, const NodeHook &callback)
 Safely removes a callback from a collection.
 
bool safe_remove_conditional_callback (std::vector< std::pair< NodeHook, NodeCondition > > &callbacks, const NodeCondition &callback)
 Safely removes all conditional callbacks with a specific condition.
 
void atomic_set_strong (std::atomic< NodeState > &flag, NodeState &expected, const NodeState &desired)
 Atomically sets a node state flag with strong memory ordering.
 
void atomic_set_flag_strong (std::atomic< NodeState > &flag, const NodeState &desired)
 Atomically sets a node state flag to a specific value.
 
void atomic_add_flag (std::atomic< NodeState > &state, NodeState flag)
 Atomically adds a flag to a node state.
 
void atomic_remove_flag (std::atomic< NodeState > &state, NodeState flags)
 Atomically removes a flag from a node state.
 
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_inc_modulator_count (std::atomic< uint32_t > &count, int amount)
 Atomically increments the modulator count by a specified amount.
 
void atomic_dec_modulator_count (std::atomic< uint32_t > &count, int amount)
 Atomically decrements the modulator count by a specified amount.
 
void try_reset_processed_state (std::shared_ptr< Node > node)
 Attempts to reset the processed state of a node.
 
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.
 
void update_routing_state (RoutingState &state)
 Updates the routing state for a node based on its current channel usage.
 

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.