MCPcopy Create free account
hub / github.com/jerryuhoo/Fire / updateParameters

Method updateParameters

Source/PluginProcessor.cpp:1599–1648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1597}
1598
1599void FireAudioProcessor::updateParameters()
1600{
1601 //==============================================================================
1602 // 1. Update Global and Crossover Parameters
1603 //==============================================================================
1604
1605 // Get the number of active bands for processing loops.
1606 numBands = *treeState.getRawParameterValue(NUM_BANDS_ID);
1607 activeCrossovers = numBands - 1;
1608
1609 // Update smoothers for crossover frequencies.
1610 smoothedFreq1.setTargetValue(*treeState.getRawParameterValue(ParameterIDAndName::getIDString(FREQ_ID, 0)));
1611 smoothedFreq2.setTargetValue(*treeState.getRawParameterValue(ParameterIDAndName::getIDString(FREQ_ID, 1)));
1612 smoothedFreq3.setTargetValue(*treeState.getRawParameterValue(ParameterIDAndName::getIDString(FREQ_ID, 2)));
1613
1614 //==============================================================================
1615 // 2. Update Per-Band Smoothed Parameters
1616 //==============================================================================
1617
1618 // Iterate through the bands vector to update each BandProcessor's smoothers.
1619 for (int i = 0; i < 4; ++i)
1620 {
1621 if (auto* band = bands[i].get())
1622 {
1623 // band->drive.setTargetValue(*treeState.getRawParameterValue(ParameterID::driveIds[i]));
1624 band->recSmoother.setTargetValue(*treeState.getRawParameterValue(ParameterIDAndName::getIDString(REC_ID, i)));
1625 band->biasSmoother.setTargetValue(*treeState.getRawParameterValue(ParameterIDAndName::getIDString(BIAS_ID, i)));
1626 }
1627 }
1628
1629 //==============================================================================
1630 // 3. Update Global Filter Smoothed Parameters
1631 //==============================================================================
1632
1633 // Use the existing helper function to get all filter-related parameter values.
1634 auto chainSettings = getChainSettings(treeState);
1635
1636 // Set the target values for all global filter smoothers.
1637 lowcutFreqSmoother.setTargetValue(chainSettings.lowCutFreq);
1638 lowcutGainSmoother.setTargetValue(chainSettings.lowCutGainInDecibels);
1639 lowcutQualitySmoother.setTargetValue(chainSettings.lowCutQuality);
1640
1641 peakFreqSmoother.setTargetValue(chainSettings.peakFreq);
1642 peakGainSmoother.setTargetValue(chainSettings.peakGainInDecibels);
1643 peakQualitySmoother.setTargetValue(chainSettings.peakQuality);
1644
1645 highcutFreqSmoother.setTargetValue(chainSettings.highCutFreq);
1646 highcutGainSmoother.setTargetValue(chainSettings.highCutGainInDecibels);
1647 highcutQualitySmoother.setTargetValue(chainSettings.highCutQuality);
1648}
1649
1650void FireAudioProcessor::sumBands(juce::AudioBuffer<float>& outputBuffer,
1651 const std::array<juce::AudioBuffer<float>*, 4>& sourceBandBuffers,

Callers

nothing calls this directly

Calls 3

getIDStringFunction · 0.85
getChainSettingsFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected