What framesize is usually used for audio effects? 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?
Typically this requires a trade off between CPU efficiency and latency. Frame based signal processing incurs at least one frame of latency and it you are planning to play live through the effect, you need to keep this quite low otherwise it get's distracting.
On the other hand, frame-based processing is way more efficient than sample by sample processing, since you can use DMA, vector instructions, highly optimized loops etc and you can amortize setup (coefficient calculation and loading, loading and storing of states, etc.) over the entire frame.
For live audio effects which moderate algorithmic complexity, something like 32 or 64 samples at 44.1 kHz or 48 kHz typically is a good starting point.