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

Method getModulatedValue

Source/DSP/LfoManager.cpp:147–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147float LfoManager::getModulatedValue(const juce::String& parameterID) const
148{
149 // Check if the parameter ID exists in our map of modulated normalized values.
150 auto it = modulatedValues.find(parameterID);
151
152 if (it != modulatedValues.end())
153 {
154 // Convert normalized value to real value ---
155 auto* parameter = treeState.getParameter(parameterID);
156 if (parameter)
157 {
158 // If found, convert the final normalized value back to the parameter's real value.
159 return parameter->convertFrom0to1(it->second);
160 }
161 }
162
163 // If not found, it means the parameter is not being modulated.
164 // Return its original value directly from the APVTS.
165 // NOTE: It's safer to get the parameter and ask for its real value.
166 if (auto* param = treeState.getRawParameterValue(parameterID))
167 return *param;
168
169 jassertfalse; // Parameter not found
170 return 0.0f;
171}
172
173// =============================================================================
174// Private Helper Functions

Callers 5

processBlockMethod · 0.80
getChainSettingsFunction · 0.80
processMultiBandMethod · 0.80
applyGlobalMixMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected