[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] odd buffer numchan limits



Hi,

trying to use bigger multichannel buffers,
I found some odd differences in the limits:

s.reboot;
n = 20;	b = Buffer.alloc(s, 2000, n);

	// max 22
{ BufRd.ar(n, b.bufnum, LFSaw.ar(1, 2000)) }.play;

	// max 20
{ BufWr.ar(SinOsc.ar ! n, b.bufnum, LFSaw.ar(1, 2000)) }.play;

	// max 20
{ PlayBuf.ar(n, b.bufnum) }.play;

	// max 18
{ RecordBuf.ar(SinOsc.ar ! n, b.bufnum, LFSaw.ar(1, 2000)) }.play;

	// no obvious limit, depends on s.options.numWireBufs
{ PanAz.ar(256, SinOsc.ar * 0.1, MouseX.kr(-1, 1)) }.play;

on windows, BufRd only goes to 16 (!?), others not tested yet.

	// soundfile writing goes up to 256
n = 256;
f = SoundFile.new.numChannels_(n);
f.openWrite("testNChans.aif");
f.writeData(a = Signal.series(n * 100, 0, 1));
f.close;

b = Buffer.read(s, "testNChans.aif", action: { |a| a.postln });

I think it would be useful to have a server option maxBufChannels,
which then all Ugens should be able to play safely;
then one can check it in BufRd-ar etc to avoid server crashes.
(And you could set it to very low for server efficiency if you
know you never need more than say 8 chan buffers).

opinions ?

best, adc
--
--
Alberto de Campo
Bergstrasse 59/33
A-8020 Graz, Austria
e-mail : decampo@xxxxxx
--