I'm working on an enhanced and more flexible version of a classic vocoder (i.e. filterbank-based, not phase-vocoder) that allows among other to define dynamically the internal filter bank. It works quite well in patch version, but since the number and values of the frequencies of the filter bank can be dynamically changed, it requires to dynamically create/delete new voices in a poly~ object, which may sometimes need several seconds to achieve.
This wouldn't be a huge deal to code this as a C++ external, but since the project needs to be shared, I'm a little bit reluctant to go this way, not because of sharing, but since I have bad experiences with externals compiled on windows on my machine and not working universally on all windows machines. Even if I provide the sources with the compiled external it's not an ideal solution, most users of my project won't be able to open Visual Studio and compile the whole themselves.
So: I'm working on a gen~ version of it, but then I'm facing a problem: each filter of the bank needs to store and retrieve its own states, and this very quickly. Currently I have internal Data arrays that allow me to do that, but because of the big number of peeks and pokes, the whole is a CPU hog.
The ideal case would be that each biquad filter (called from a function) also contains and manage its states as History variables. This seems to be indeed partly possible:
Looking at the exported C++ code, one sees that 5 instances of the filter are created, each one having its own state variables.
But in my case this won't work, since we don't know in advance the number of frequencies (and then the number of filter instances).