Change configuration of plugin by listen to an int var


#1

Hi all,
I’m preceding with my DSP effect for guitar, now I’ve implemented the mechanic to change the values of the parameters (I’m not using ValueTree but a custom Preset object with array of plugin parameter values). Now Iìm able to see the values but not to change them (I’ve started another topic for that) but now I need to change the entire preset (aka take another array and set the parameter with its values).

I need to implement a Listener class that monitor the change of a an int var that is the number of the array in the Preset Object, and set all the values to the parameters of my VST.
So I need:

1- Listen to the change of an int var
2- make a callback after the change
3- in the callback get the array values and set the parameters (I have a function that do that)
4- stop the current processBlock and restart it quirk the new values

Any idea?


#2

Have you looked at the Value class? It contains a reference to a var object and you can attach a Listener to it to receive a callback when the value is changed.

Ed