Hi,
I use an AudioProcessorValueTreeState
object with slider attachment. I’ve a feature that restore the my slider to the default value when I click on it with the alt
modifier key.
To achieve this I use the method void mouseUp(const MouseEvent& event)
and inspect the event if the alt key is down event.mods.isAltDown()
, if it’s true then I restore my slider to the default value:
void MyComponent::mouseUp(const MouseEvent& event) {
if(event.mods.isAltDown()) {
const auto parameter = valueTreeState_.getParameter(parameterId_);
const auto defaultValue = parameter->getDefaultValue();
parameter->setValue(defaultValue);
}
}
It works like a charm except on cubase with vst3. When I do that with my slider on a value of X, I see this one going to the default value then going back directly to the previous X value.
If I use the Xcode debugger, and put a break point and do a step by step it seems to work sometime. Really weird… Isn’t a performance issue on vst3?
Does anyone already encounter this issue?
Thanks