MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ set_transformation_parameter()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
void MayaFlux::Yantra::SpectralTransformer< InputType, OutputType >::set_transformation_parameter ( const std::string &  name,
std::any  value 
)
inlineoverrideprotectedvirtual

Sets transformation parameters.

Parameters
nameParameter name
valueParameter value

Handles setting of spectral operation type and delegates other parameters to base class. Supports both enum and string values for the "operation" parameter.

Common parameters include:

  • "shift_hz": Frequency shift in Hz
  • "pitch_ratio": Pitch scaling factor (1.0 = no change)
  • "low_freq", "high_freq": Filter frequency bounds
  • "enhancement_factor": Harmonic enhancement strength
  • "threshold": Spectral gate threshold in dB
  • "window_size", "hop_size": FFT processing parameters

Reimplemented from MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >.

Definition at line 231 of file SpectralTransformer.hpp.

232 {
233 if (name == "operation") {
234 if (auto op_result = safe_any_cast<SpectralOperation>(value)) {
235 m_operation = *op_result.value;
236 return;
237 }
238 if (auto str_result = safe_any_cast<std::string>(value)) {
239 if (auto op_enum = Utils::string_to_enum_case_insensitive<SpectralOperation>(*str_result.value)) {
240 m_operation = *op_enum;
241 return;
242 }
243 }
244 }
245
247 }
SpectralOperation m_operation
Current spectral operation.
virtual void set_transformation_parameter(const std::string &name, std::any value)
Transformation-specific parameter handling (override for custom parameters)