MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
UniversalTransformer.hpp File Reference

Float Processing Guidelines. More...

+ Include dependency graph for UniversalTransformer.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MayaFlux::Yantra::TransformationKey
 Multi-dimensional transformation key specification for complex transformations. More...
 
class  MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >
 Template-flexible transformer base with instance-defined I/O types. More...
 

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
 
namespace  MayaFlux::Yantra
 

Enumerations

enum class  MayaFlux::Yantra::TransformationType : uint8_t {
  MayaFlux::Yantra::TEMPORAL , MayaFlux::Yantra::SPECTRAL , MayaFlux::Yantra::MATHEMATICAL , MayaFlux::Yantra::CROSS_MODAL ,
  MayaFlux::Yantra::GENERATIVE , MayaFlux::Yantra::SPATIAL , MayaFlux::Yantra::PATTERN_BASED , MayaFlux::Yantra::RECURSIVE ,
  MayaFlux::Yantra::GRANULAR , MayaFlux::Yantra::CONVOLUTION , MayaFlux::Yantra::CUSTOM
}
 Categories of transformation operations for discovery and organization. More...
 
enum class  MayaFlux::Yantra::TransformationStrategy : uint8_t {
  MayaFlux::Yantra::IN_PLACE , MayaFlux::Yantra::BUFFERED , MayaFlux::Yantra::STREAMING , MayaFlux::Yantra::INCREMENTAL ,
  MayaFlux::Yantra::LAZY , MayaFlux::Yantra::CHUNKED , MayaFlux::Yantra::PARALLEL , MayaFlux::Yantra::RECURSIVE
}
 Transformation execution strategies. More...
 
enum class  MayaFlux::Yantra::TransformationQuality : uint8_t {
  MayaFlux::Yantra::DRAFT , MayaFlux::Yantra::STANDARD , MayaFlux::Yantra::HIGH_QUALITY , MayaFlux::Yantra::REFERENCE ,
  MayaFlux::Yantra::ADAPTIVE
}
 Quality vs performance trade-off control. More...
 
enum class  MayaFlux::Yantra::TransformationScope : uint8_t { MayaFlux::Yantra::FULL_DATA , MayaFlux::Yantra::TARGETED_REGIONS , MayaFlux::Yantra::SELECTIVE_BANDS , MayaFlux::Yantra::CONDITIONAL }
 Scope control for transformation operations. More...
 

Detailed Description

Float Processing Guidelines.

Transformers support float data processing but with some caveats:

  1. Recommended: Use double precision for maximum compatibility
  2. Supported: Float processing works in most environments
  3. Warning: Mixed float/double processing may cause memory issues
  4. Best Practice: Stick to one numeric type per transformer instance

Example safe usage:

// Good: Consistent double usage
auto transformer = std::make_unique<MathematicalTransformer<>>();
std::vector<double> data = {1.0, 2.0, 3.0};
// Okay: Consistent float usage (with warning)
auto float_transformer = std::make_unique<MathematicalTransformer<>>();
std::vector<float> float_data = {1.0f, 2.0f, 3.0f};
// Risky: Mixed types (may cause issues)
transformer->process(double_data); // First call
transformer->process(float_data); // Second call - risky!

Modern, digital-first universal transformation framework for Maya Flux

The UniversalTransformer system provides a clean, extensible foundation for data transformation in the Maya Flux ecosystem. Unlike traditional audio transformers limited to analog metaphors, this embraces the digital paradigm: data-driven workflows, multi-modal transformations, and computational possibilities beyond physical analog constraints.

Core Philosophy

A transformer modifies ComputeData through digital-first approaches:

  1. Temporal transformations: Time-stretching, reversing, granular manipulation
  2. Spectral transformations: Frequency domain processing, spectral morphing, cross-synthesis
  3. Mathematical transformations: Polynomial mapping, matrix operations, recursive algorithms
  4. Cross-modal transformations: Audio-to-visual mapping, pattern translation between modalities
  5. Generative transformations: AI-driven, grammar-based, stochastic transformations
  6. Multi-dimensional transformations: N-dimensional data manipulation, spatial transformations

Key Features

  • Universal input/output: Template-based I/O types defined at instantiation
  • Type-safe transformation: C++20 concepts and compile-time guarantees
  • Transformation strategies: In-place, buffered, streaming, recursive
  • Composable operations: Integrates with ComputeMatrix execution modes
  • Digital-first design: Embraces computational possibilities beyond analog metaphors

Usage Examples

// Transform DataVariant containing audio/video/texture data
auto transformer = std::make_shared<MyTransformer<Kakshya::DataVariant>>();
// Transform signal containers with time-stretching
auto time_transformer = std::make_shared<MyTransformer<
std::shared_ptr<Kakshya::SignalSourceContainer>,
std::shared_ptr<Kakshya::SignalSourceContainer>>>();
// Transform matrices with mathematical operations
auto matrix_transformer = std::make_shared<MyTransformer<
Eigen::MatrixXd,
Eigen::MatrixXd>>();

Definition in file UniversalTransformer.hpp.