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

Method clearLfoModulationForBand

Source/PluginProcessor.cpp:2539–2562  ·  view source on GitHub ↗

* @brief Clears (un-assigns) any LFO modulation that targets a specific band. * * This is used to clean up modulation routings when a band is being reset to its * default state, for example, when a new band is created. * * @param bandIndex The 0-based index of the band whose modulation targets should be cleared. */

Source from the content-addressed store, hash-verified

2537 * @param bandIndex The 0-based index of the band whose modulation targets should be cleared.
2538 */
2539void FireAudioProcessor::clearLfoModulationForBand(int bandIndex)
2540{
2541 auto& routings = lfoManager->getModulationRoutings();
2542 const auto& bandParamBases = ParameterIDAndName::getBandParameterInfo();
2543 const juce::String bandSuffix = juce::String(bandIndex + 1);
2544
2545 for (auto& routing : routings)
2546 {
2547 if (routing.targetParameterID.isEmpty())
2548 continue;
2549
2550 for (const auto& paramInfo : bandParamBases)
2551 {
2552 // Check if the target is an exact match for a parameter in the specified band
2553 if (routing.targetParameterID == (paramInfo.idBase + bandSuffix))
2554 {
2555 routing.targetParameterID = ""; // Set target to "None"
2556 goto next_routing_clear;
2557 }
2558 }
2559 next_routing_clear:;
2560 }
2561 lfoDataHasChanged();
2562}
2563
2564bool FireAudioProcessor::getLatestDistortionGraphValues(DistortionGraphValues& values)
2565{

Callers 2

setStatesWhenAddMethod · 0.80
setStatesWhenDeleteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected