New helper function to check modulation and update state
| 250 | |
| 251 | // New helper function to check modulation and update state |
| 252 | void 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 | |
| 282 | void FilterControl::resized() |
| 283 | { |
nothing calls this directly
no outgoing calls
no test coverage detected