Hey all,
I was wondering if there is any way to increase the number of available audio buffers in SuperCollider on the Bela?

Normally this would be done by setting a number of buffers in ServerOptions.numBuffers before booting the server, like so:

s.options.numBuffers = 256; 

On the Bela this number seems to be totally ignored. What's worse, the default number of available buffers is only 128 on the Bela! This is significantly less than the usual 1024 that is the default on most SuperCollider builds.

(in case you're curious: I discovered this hard limit by running the following code)

s.waitForBoot {
	a = List.new;
	1027.do {|idx|
		var buf = Buffer.new(s);
		a.add(buf);
		idx.postln;
	}
};

Which gives the error ERROR: No more buffer numbers -- free some buffers before allocating more.

Any ideas on how to get more buffers? Or is this limit a conscious decision hard-coded somewhere?

Hey giuliomoro
The issue you pointed me to is about busses and not buffers as far as I can tell..
I made a new issue here

4 days later

then I am not sure what the difference is between busses and buffers ...

    giuliomoro

    just fyi on terminology in SuperCollider
    busses are the fundamental tool for signal routing, so for example on the Bela, there are a number of busses that are assigned to the hardware signal outputs that you can write to, and there are busses connected to the hardware inputs that you can read from. There are also internal "virtual" busses that can be used to route signals between UGens. Every bus has a unique ID number.

    buffers are blocks of memory that store sequential data (usually audio) ... you allocate buffers manually in SuperCollider and can load sample files into them, record to them, read from them, etc...

    The problem I'm running into here is that for some reason the Bela SC setup is not allowing me to allocate more than 128 buffers (I'm loading a bunch of small sample files).

    7 days later

    Bela's IDE allows for buffer sizes of up to 4096 unless your IDE version is old, i suppose.

    Unfortunately the options in the IDE are ignored by supercollider projects