I've been porting a PD patch running on my Mac over to Bela - the patch is for an electronic viola I'm designing. It's a pretty extensive patch and can get CPU intensive. There are many times where the Bela's CPU overloads, usually when running simultaneous processing (signal processing, synthesizers, etc & each viola string has it's own signal chain) and/or various FFT processing algorithms (esp when getting to larger block sizes (256, 512, 1024, 2048 ...) which I need for the sonic qualities I'm going for). I'm considering everything I can do to optimize the patch. A few questions on ideas I'm looking in to:
I'm seeing that several of the PD objects I use are not listed as being supported by Heavy (https://github.com/CarloCattano/hvcc/blob/master/docs/14.Supported_vanilla_objects.md):
||
cputime
expr
Netsend
Netreceive
Textfile
Bang~
Block~
Expr~
rfft~
rifft~
Switch~
tabreceive~
vline~
The patch still runs, however. Is it just that these objects are not compiled to run with lower level optimization? Any suggestions?
Also, I remember reading that expr / expr~ aren't CPU friendly - is it suggested to instead use the normal PD + - * / objects instead?
Something simple, like using * instead of / for math? Helpful?
A few things I have done:
-implemented switch~ all over the patch to turn things off not in use & help out the Bela.
-followed the suggestion (https://forum.bela.io/d/490-underrun-detected-errors) to distribute cpu load across different audio callback when possible
Any thoughts on previous questions and/or ways to optimize this PD patch? Thank you