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

◆ apply_preset()

void MayaFlux::Nodes::Network::ResonatorNetwork::apply_preset ( FormantPreset  preset)

Apply a FormantPreset to the current network.

Parameters
presetTarget vowel/formant configuration

Resonators that exceed the preset's defined count retain their current parameters.

Definition at line 452 of file ResonatorNetwork.cpp.

453{
454 std::vector<double> freqs, qs;
455 preset_to_vectors(preset, m_resonators.size(), freqs, qs);
456
457 for (size_t i = 0; i < m_resonators.size(); ++i) {
458 m_resonators[i].frequency = freqs[i];
459 m_resonators[i].q = qs[i];
461 }
462}
void compute_biquad(ResonatorNode &r)
Compute RBJ biquad bandpass coefficients and push them into a resonator's IIR.
static void preset_to_vectors(FormantPreset preset, size_t n, std::vector< double > &out_freqs, std::vector< double > &out_qs)
Translate a FormantPreset into parallel frequency/Q vectors.

References compute_biquad(), m_resonators, and preset_to_vectors().

+ Here is the call graph for this function: