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

Method setParametersToAFromB

Source/Panels/SpectrogramPanel/Multiband.cpp:200–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void Multiband::setParametersToAFromB(int toIndex, int fromIndex)
201{
202 const auto& fromArray = paramsArrays[fromIndex];
203 const auto& toArray = paramsArrays[toIndex];
204
205 for (const auto& param : processor.getParameters())
206 {
207 if (auto* p = dynamic_cast<juce::AudioProcessorParameterWithID*>(param))
208 {
209 juce::String paramFromID = p->getParameterID();
210 float paramFromValue = p->getValue();
211
212 for (size_t i = 0; i < fromArray.size(); ++i)
213 {
214 if (fromArray[i] == paramFromID)
215 {
216 for (const auto& paramTo : processor.getParameters())
217 {
218 if (auto* pTo = dynamic_cast<juce::AudioProcessorParameterWithID*>(paramTo))
219 {
220 if (toArray[i] == pTo->getParameterID())
221 {
222 pTo->setValueNotifyingHost(paramFromValue);
223 break;
224 }
225 }
226 }
227 break;
228 }
229 }
230 }
231 }
232}
233
234bool Multiband::isParamInArray(juce::String paramName, const std::vector<juce::String>& paramArray)
235{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected