MayaFlux 0.4.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 465 of file ResonatorNetwork.cpp.

466{
467 std::vector<double> freqs, qs;
468 preset_to_vectors(preset, m_resonators.size(), freqs, qs);
469
470 for (size_t i = 0; i < m_resonators.size(); ++i) {
471 m_resonators[i].frequency = freqs[i];
472 m_resonators[i].q = qs[i];
474 }
475}
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: