* @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. */
| 2537 | * @param bandIndex The 0-based index of the band whose modulation targets should be cleared. |
| 2538 | */ |
| 2539 | void 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 | |
| 2564 | bool FireAudioProcessor::getLatestDistortionGraphValues(DistortionGraphValues& values) |
| 2565 | { |
no outgoing calls
no test coverage detected