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

Method getModulationInfoForParameter

Source/PluginProcessor.cpp:2132–2149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2130}
2131
2132FireAudioProcessor::ModulationInfo FireAudioProcessor::getModulationInfoForParameter(const juce::String& parameterID) const
2133{
2134 const juce::ScopedLock sl(lfoManager->getLfoDataLock());
2135 // Find the routing in the manager's list
2136 for (const auto& routing : lfoManager->getModulationRoutings())
2137 {
2138 if (routing.targetParameterID == parameterID)
2139 {
2140 if (juce::isPositiveAndBelow(routing.sourceLfoIndex, 4))
2141 {
2142 const float unipolarLfoValue = lfoManager->getLfoOutput(routing.sourceLfoIndex);
2143 float finalLfoValue = routing.isBipolar ? (unipolarLfoValue * 2.0f - 1.0f) : unipolarLfoValue;
2144 return { true, routing.sourceLfoIndex + 1, routing.depth, finalLfoValue, routing.isBipolar, routing.isBypassed };
2145 }
2146 }
2147 }
2148 return { false, 0, 0.0f, 0.0f, true, false }; // Default "not modulated" state
2149}
2150
2151void FireAudioProcessor::setModulationValue(const juce::String& targetParameterID, float newValue)
2152{

Callers 2

timerCallbackMethod · 0.80

Calls 1

getLfoOutputMethod · 0.80

Tested by

no test coverage detected