MayaFlux 0.3.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 166 of file SpectralTransformer.hpp.

167 {
168 if (name == "operation") {
169 if (auto r = safe_any_cast<SpectralOperation>(value)) {
170 m_operation = *r.value;
171 return;
172 }
173 if (auto r = safe_any_cast<std::string>(value)) {
174 if (auto e = Reflect::string_to_enum_case_insensitive<SpectralOperation>(*r.value)) {
175 m_operation = *e;
176 return;
177 }
178 }
179 }
180
182 }
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)