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 463 of file ResonatorNetwork.cpp.

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