I have two sliders that are using the same graphic.
The first one - the Frequency slider - operates very smoothly. Its range is 20Hz - 20000Hz.
The other one has jerky animation. Its range is 0.0f to 1.0f.
Why is that?
My hunch is there is some bug in the valueToText and textToValue conversions in the underlying AudioParameter, so that the mouse movement is somehow not converted into a linear monotonous function…
Or something else happening in your listener…
Without knowing the whole code, looks like the good old parameter-changed feedback stuttering.
Maybe you notify the host the slider has changed, and get immediately the message that the value has changed, while the slider (in the movement) is already on a further position.
I tried inside sliderValueChanged() --PluginEditor.cpp
else if (slider == &mHPResonance_slider)
{
if (!mHPResonance_slider.isMouseOverOrDragging())
{
audioProcessor.mHPResonance_value = (float)mHPResonance_slider.getValue();
}
and even also if (!mHPResonance_slider.isMouseButtonDown() && !mHPResonance_slider.isMouseOverOrDragging())
Same issue. @railjonrogut the step value is 0.01… I tried 0.001.
since the Attachment should initialize those… and they could cause you a headache later while debugging. The SliderAttachment will also update the Slider value notifying the host… so you don’t need the Slider::Listener either.