• Audio
  • bela gives up when trying to play more than 5 audio files at once

I'm pretty new to using csound on anything other than my laptop. I'm trying to build a portable musical instrument that generates ambient soundscapes from various buttons, and it works very well when using a midi controller attached to my laptop.

I wanted to slowly try and transfer the code onto the bela in a way that would let me trigger the samples with buttons (to be soldered on), instead of MIDI. I got as far as just loading my samples into the bela using function tables in csound to see if they worked, and was testing out triggering them one at a time by calling the instrument from the digital in pin.

As soon as I had more than five instances of a single instrument/audio file playing at once, the bela's CPU overloaded and it crashed. The wav files are about 10mb each. For the actual instrument I need roughly 8 audio files running at any given time.

Would anyone be able to tell me if this is just me being dense or having messed up somewhere, or if the bela is unable to play more than 5 20 second wav files at once without crashing? Thanks so much!

Bela can in general play back more than 20 files at once, at least in C++ and Pd. Not sure with Csound, but unless the implementation is really sloppy, I wouldn't know why that would be the case. Unfortunately I don't know how to use Csound at all, but if you share your code, I'll be happy to try it out.

    giuliomoro Ah, that's more the number I'd expected. I can't provide the code right now because the bela is at my campus and we have a hurricane at the moment but I will try and upload it in the next two days, I'd be really appreciative if anyone could help out. I started trying to make it work on a raspberry pi instead but I'm struggling with that too! Thanks so much!!