332 Audio Effects: Theory, Implementation and Application
Managing Parameters
PluginEditor.cpp implements two methods for keeping the on- screen controls
synchronized with the values of each parameter in the DelayAudioProcessor
object. The rst method queries the current parameter values and changes the
user interface to match:
void DelayAudioProcessorEditor::timerCallback()
{
DelayAudioProcessor* ourProcessor = getProcessor();
delayLengthSlider_.setValue(ourProcessor->delayLength_,
dontSendNotification);
feedbackSlider_.setValue(ourProcessor->feedback_,
dontSendNotification);
dryMixSlider_.setValue(ourProcessor->dryMix_,
dontSendNotification);
wetMixSlider_.setValue(ourProcessor->wetMix_,
dontSendNotification);
}
In the constructor, a timer ...