I need 5-10x more CPU to run multiple physical modelling PD patches, with multiple digital and analog inputs controlling different variables. How can I increase the CPU power of a Bela Mini?

If not possible, what ideas do you have?

5x is what I'd expect as the maximum improvement you'd get from running Pd patches on Bela using the heavy compiler hvcc, however hvcc limits the number of objects you can use to a subset of the Pd vanilla ones. You could give it a try and see if you can compile your patch with it as it is - following the instructions here https://github.com/Wasted-Audio/hvcc - or whether it's feasible to simplify your patch to meet these constraints. Once you've successfully installed hvcc on your computer, Bela's build_pd_hvcc.sh script can be used to call hvcc and build he project.

If this is not viable or not sufficient (I don't want to oversell it), then it sounds like your application is beneath the reach of the current capabilities of Bela and theres' currently no way of increasing its CPU power.

Ohh I'll try that.

And if it's still not enough? Any ideas? Plans for larger releases?

Do you know if there's any tool to color code different objects for CPU usage?

    peter_n Plans for larger releases?

    hopefully.

    peter_n Do you know if there's any tool to color code different objects for CPU usage?

    Not sure I understand, but I am confident the response is no.

      giuliomoro looking forward to it!

      About the color coding, would be nice to quickly see objects or parts of a patch that are super heavy. Especially for massive patches. I often need to dredge through to make them lighter and it takes a long time to find the heavy elements like a random expr~ 1-$f1

        nah that's not really possible. The closest you can get is to benchmark smaller pieces of patch (or even single objects). If you place this in "Command line settings":

        --board=Batch --codec-mode=s=1,p=95,t=2

        you won't get any sound when running, but after 2 seconds you'll get reproducible CPU statistics for a patch, e.g.:

        frames: 1357136
        wallTime: 2.000105833s
        cpu: 6.499%

        and so this may help you to find bottlenecks.

        Start with a patch without objects to find out the baseline CPU usage of simply running a Pd patch. That's about 2.6% for me at 16 samples per block.

        Note that when you run your patch, the expected CPU usage is the sum of the values reported by the individual components after subtracting the baseline Pd patch consumption from each plus a global 10% to 15% due to Bela's input/output processing (which is excluded in these offline tests). This can go as low as 6% or 7% if you increase the block size to 64 or 128 (don't push it above that).

        peter_n also, does the bela mini's CPU usage increase as the SD gets filled?

        no

        I'm in the same boat.
        It would be interesting if it was possible to run Pd directly on Bela. Maybe it could be lighter without compiling.

        My solution for now is using Bela for simple audio processing and all my control voltages, and using a laptop for more complicated Pd patches.

          Floris if it was possible to run Pd directly on Bela.

          That's what's happening and it's part of the problem: Pd is slow. Heavy/hvcc transpiles the patch to more optimised C++ code which is then compiled and that's what gives the performance boost.

            3 months later