Hi!
First of all let me say how much fun bela is. It really nails a sweet spot between accessibility and functionality for someone like me (engineering student). And the forum support (I've only been lurking until now) and IDE are just great!
Now to my question:
Am I pushing the limits of bela's computational capabilities or am I doing something ineffcient?
Short introduction to my project: I am implementing a somewhat heavy model, primarily consisting of cascaded filterbanks that obey a control engine for simulating non-linearity in the system. The filterbanks are the main bulk of the system and each filter is made of 4 cascaded biquad bandpass-ish IIR filters. Naturally I'd like to optimize the design and code so I can squeeze the maximum out of bela and have the highest possible fidelity.
However, I was a bit surprised by how "few" of these 4th* order biquad filters I could actually run in real time and I'd like to know whether that is to be expected or I should look for optimizations, since the hardware should be able to lift more.
Right now I can run ~90 4th order biquads (so 360 biquads) @44.1kHz (with 128 audio frames per block) before getting into CPU trouble. This is wihtout any other processes, it's simply a loop over 150 times 4 biquads in render().
Does this seems right to you? I simply cannot tell...
Everything is done as <float> type (I think at least, I coudln't find any doubles in the the .s files).
Another related question which I will also put here, since it seems relevant: I am using a very modular approach where I have objects of vectors of objcets of vectors of objects of objects, etc. And the very bottom (about 5-6 levels of entities down) are my biquads. This is something I have inherited from FPGA (in VHDL) where such an approach is desirable since it doesn't cost anything in pure hardware. But is this somehting that should be avoided in C++? Even if everything is passed as references and as few constructors/methods as possible are called?
Sorry for the wall of text, but I'd really appreciate some help in these matters :-)
Thank you!
*by "4th order biquad filter" I mean 4 casdaded biquad (2nd order) filters. I know this not the correct term but I hope you get what I mean.
TL;DR: I can run ~360 biquad filters @44.1kHz with a block size of 128. Does this seem reasonable?
Edit: Changed some numbers, the amount of possible filters is lower than first reported.