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

◆ set_q()

void MayaFlux::Nodes::Network::ResonatorNetwork::set_q ( size_t  index,
double  q 
)

Set Q factor of a single resonator and recompute its coefficients.

Parameters
indexResonator index (0-based)
qNew quality factor (clamped to [0.1, 1000.0])
Exceptions
std::out_of_rangeif index >= get_node_count()

Definition at line 414 of file ResonatorNetwork.cpp.

415{
416 if (index >= m_resonators.size()) {
417 error<std::out_of_range>(Journal::Component::Nodes, Journal::Context::NodeProcessing, std::source_location::current(),
418 "ResonatorNetwork::set_q: index out of range (index={}, resonator_count={})", index, m_resonators.size());
419 }
420 auto& r = m_resonators[index];
421 r.q = std::clamp(q, 0.1, 1000.0);
423}
double q
void compute_biquad(ResonatorNode &r)
Compute RBJ biquad bandpass coefficients and push them into a resonator's IIR.
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.

References compute_biquad(), m_resonators, MayaFlux::Journal::NodeProcessing, MayaFlux::Journal::Nodes, and q.

Referenced by apply_one_to_one_parameter(), and set_all_q().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: