Hello 🙂

I am fairly new user to Bela and I am using it with Pure Data, which I've used for years. I do have experience with other DSP platforms, like Axoloti Organelle etc., but I have not experienced this kind of error before. I did do a search in the forum, but that only gave me one thread, which was related to Supercollider and not PD. I could not really make a lot of sense of what to do, in my context, from that thread.

Anyway, I am experiencing some issues with underruns. I get this error:
Underrun detected: 2 blocks dropped

...... Pretty much every time a note or a chord is send to the Bela, via USB midi, from my Mac, I get this error.

After a full day of troubleshooting and using the exclusion method to find out what was the culprint, I think I finally got something that could be the cause of the underruns, which causes some clicks on note on/off.

First I just started to delete some objects to see if they caused the issues. A few times I got it solved but at that time I deleted so many objects that the patch was unusable. Then I went back to the original patch and only deleted the few objects that made it work the first time.... And it still did not fix the issue it still happens. It was very inconsistent what result I got.

I am working on a polyhonic synth, which works fully in PD on my Mac. And then I realised that when I send chords and overlapping notes, it also happens then.... Sometimes........

So I am getting some very inconsistent results, which I find it hard to conclude something from.

So I guess I probably could ask a general question here:
- What causes underruns?
- What can I do to prevent them?
- Would changing the patch buffer from the standard 64 to 128 make a difference? Is that possible?

Really, any help appreciated 😉

Thanks!

  • What causes underruns?

a spike in CPU usage. For instance, it could be that starting the notes has some overhead associated with it, which causes one or more blocks of audio to take longer at processing than the rest.

  • Would changing the patch buffer from the standard 64 to 128 make a difference? Is that possible?

That's a good solution, yes: by increasing the buffer size you will be less sensitive to localised spikes in CPU usage and therefore you will probably avoid the underruns.

Oh isn't Bela running PD actually set for 16 buffer size as default and not 64?

I changed the blocksize to 64 from 16, in the Bela IDE, but it doesn't seem to change anything, still same issue.

If I want to change it to any larger buffer for Pure Data, how do I go about doing that?

On Mac I use JackPilot to set the buffer size, not really sure how to do it here on Bela?

    Jaffasplaffa Oh isn't Bela running PD actually set for 16 buffer size as default and not 64?

    yes

    Jaffasplaffa I changed the blocksize to 64 from 16, in the Bela IDE, but it doesn't seem to change anything, still same issue.

    that's the one, you need to restart the program after changing it for the change to take effect

    Jaffasplaffa On Mac I use JackPilot to set the buffer size, not really sure how to do it here on Bela?

    IDE is the only way.

    Ahh thanks!

    Actually it did help, when I made the buffer larger. But there was another issue too. I am using Westlicht performer sequencer to trigger Bela and apparently there was an issue from the Westlicht side, but I got that sorted too.

    So now it seems to be working 🙂

    Thanks 🙂