I want to implement an audio effect that reacts to an external parameter that varies over time. The book I have describes an effect in a function that processes a certain framesize of the audio input. But using 1024 samples or more might be too slow to react on the external parameter, since it would only change all 1024 samples. In the MATLAB simulation I am passing a pre-computed array to the function. Now I want to implement this on a DSP.
One solution I can think of is using a global variable and a multihreaded application. One thread writes the current paramenter to the global variable and the other thread processes the effect filter only with that current variable. That way I would not have to pass an array every time and always have the up-to-date parameter.
Another way would be calling the function every few samples. Since it is based on a second-order filter, the minimum I need is three samples. This would also be more than enough for the parameter.
Is there a standard way to go about in digital audio processing?