MayaFlux 1.0.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 190 of file SpectralTransformer.hpp.

191 {
192 if (name == "operation") {
193 if (auto r = safe_any_cast<SpectralOperation>(value)) {
194 m_operation = *r.value;
195 return;
196 }
197 if (auto r = safe_any_cast<std::string>(value)) {
198 if (auto e = Reflect::string_to_enum_case_insensitive<SpectralOperation>(*r.value)) {
199 m_operation = *e;
200 return;
201 }
202 }
203 }
204
206 }
glm::vec3 value
std::string name
Definition VKDevice.cpp:123
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)

References MayaFlux::Yantra::SpectralTransformer< InputType, OutputType >::m_operation, name, MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >::set_transformation_parameter(), and value.

+ Here is the call graph for this function: