void MainEditorWindow::sliderDragStarted (Slider* slider)
{
    if (FloatParameter* parameter = getParameterFromSlider (slider))
    {
        parameter->beginChangeGesture();
    }
}
void MainEditorWindow::sliderDragEnded (Slider* slider)
{
    if (FloatParameter* parameter = getParameterFromSlider (slider))
    {
        parameter->endChangeGesture();
    }
}
void MainEditorWindow::setNormalizedValueFromSlider(Slider* slider)
{
    if (FloatParameter* parameter = getParameterFromSlider(slider))
    {
        parameter->setNormalizedValue ((float) slider->getValue());
    }
}
示例#4
0
void TheAmpAudioProcessorEditor::sliderDragEnded (Slider* slider)
{
    if (AudioProcessorParameter* param = getParameterFromSlider (slider))
    {
        param->endChangeGesture();
    }
}
/*
 * Slider::Listener methods
 *
 * Methoden, die für einen Slider::Listerner implementiert werden müssen !
 *
 * https://de.wikipedia.org/wiki/Beobachter_%28Entwurfsmuster%29
 *
 */
void Bitcrusher_demoAudioProcessorEditor::sliderValueChanged(Slider* slider){
	if (AudioProcessorParameter* param = getParameterFromSlider (slider))
	{
		// It's vital to use setValueNotifyingHost to change any parameters that are automatable
		// by the host, rather than just modifying them directly, otherwise the host won't know
		// that they've changed.
		param->setValueNotifyingHost ((float) slider->getValue());
	}
}
void MainEditorWindow::updateSliderValue(Slider* slider)
{
    if (FloatParameter* parameter = getParameterFromSlider(slider))
    {
        float unNormalizedParameterValue = parameter->getUnNormalizedUnSmoothedValue();

        slider->setValue (unNormalizedParameterValue);
    }
}
void MainEditorWindow::setSliderRange (Slider* slider)
{
    if (FloatParameter* parameter = getParameterFromSlider(slider))
    {
        double dittoInterval = slider->getInterval();

        slider->setRange (parameter->getMinimum(), parameter->getMaximum(), dittoInterval);
    }
}
示例#8
0
// This is our Slider::Listener callback, when the user drags a slider.
void TheAmpAudioProcessorEditor::sliderValueChanged (Slider* slider)
{
    if (AudioProcessorParameter* param = getParameterFromSlider (slider))
    {
        // It's vital to use setValueNotifyingHost to change any parameters that are automatable
        // by the host, rather than just modifying them directly, otherwise the host won't know
        // that they've changed.
        param->setValueNotifyingHost ((float) slider->getValue());
        if (slider == &trebleSlider || slider == &middleSlider || slider == &bassSlider)
        {
            //TheAmpAudioProcessor& ourProcessor = getProcessor();
            //ourProcessor.changeEQ();
        }
    }
}