| 286 | } |
| 287 | |
| 288 | void FilterControl::setDraggableButtonBounds() |
| 289 | { |
| 290 | float size = getWidth() / 1000.0f * 15; |
| 291 | float lowcutX = getWidth() * juce::mapFromLog10(static_cast<double>(*processor.treeState.getRawParameterValue(LOWCUT_FREQ_ID)), 20.0, 20000.0); |
| 292 | float peakX = getWidth() * juce::mapFromLog10(static_cast<double>(*processor.treeState.getRawParameterValue(PEAK_FREQ_ID)), 20.0, 20000.0); |
| 293 | float highcutX = getWidth() * juce::mapFromLog10(static_cast<double>(*processor.treeState.getRawParameterValue(HIGHCUT_FREQ_ID)), 20.0, 20000.0); |
| 294 | |
| 295 | float lowcutY = getHeight() / 2.0f * *processor.treeState.getRawParameterValue(LOWCUT_GAIN_ID) / 24.0f; |
| 296 | float peakY = getHeight() / 2.0f * *processor.treeState.getRawParameterValue(PEAK_GAIN_ID) / 24.0f; |
| 297 | float highcutY = getHeight() / 2.0f * *processor.treeState.getRawParameterValue(HIGHCUT_GAIN_ID) / 24.0f; |
| 298 | |
| 299 | draggableLowButton.setBounds(lowcutX - size / 2.0f, getHeight() / 2.0f - lowcutY - size / 2.0f, size, size); |
| 300 | draggablePeakButton.setBounds(peakX - size / 2.0f, getHeight() / 2.0f - peakY - size / 2.0f, size, size); |
| 301 | draggableHighButton.setBounds(highcutX - size / 2.0f, getHeight() / 2.0f - highcutY - size / 2.0f, size, size); |
| 302 | } |
| 303 | |
| 304 | void FilterControl::updateChain() |
| 305 | { |
nothing calls this directly
no outgoing calls
no test coverage detected