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

Method checkAnimationStatus

Source/Panels/SpectrogramPanel/FilterControl.cpp:252–280  ·  view source on GitHub ↗

New helper function to check modulation and update state

Source from the content-addressed store, hash-verified

250
251// New helper function to check modulation and update state
252void FilterControl::checkAnimationStatus()
253{
254 bool needsAnimation = false;
255 const auto& routings = processor.getLfoManager().getModulationRoutings();
256 for (const auto& routing : routings)
257 {
258 if (! routing.targetParameterID.isEmpty())
259 {
260 // Check if the target is any of the global filter parameters
261 if (routing.targetParameterID == LOWCUT_FREQ_ID || routing.targetParameterID == LOWCUT_GAIN_ID || routing.targetParameterID == LOWCUT_Q_ID || routing.targetParameterID == PEAK_FREQ_ID || routing.targetParameterID == PEAK_GAIN_ID || routing.targetParameterID == PEAK_Q_ID || routing.targetParameterID == HIGHCUT_FREQ_ID || routing.targetParameterID == HIGHCUT_GAIN_ID || routing.targetParameterID == HIGHCUT_Q_ID)
262 {
263 needsAnimation = true;
264 break;
265 }
266 }
267 }
268
269 if (needsAnimation != isAnimationActive)
270 {
271 isAnimationActive = needsAnimation;
272
273 if (! isAnimationActive)
274 {
275 // If animation has just been turned off, clear the curve and repaint once.
276 lfoResponseCurve.clear();
277 repaint();
278 }
279 }
280}
281
282void FilterControl::resized()
283{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected