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

[sc-users] trouble with consecutive buffers



hello,
I'm having difficulty getting consectively-alloced
buffers to behave.
I need to use them because I'm using VOsc.

Please have a look at the snippet of code below, and
tell me why it doesn't work.

thanks a lot.

////////////////////
(
var b_tmp;
	s = Server.local;
	s.boot;
	b_tmp = Buffer.new(s, 2048, 1,   0);
	b_tmp = Buffer.alloc(s, 2048);
	b_tmp.sine2([8,8], [1,0.5]);
	b_tmp.plot;

//copy segments of 256 samps from b_tmp to sconsec
bufs of b 
b = Buffer.allocConsecutive(8, s, 256, 1, { |buf, i|
			b_tmp.copy(buf, 0, i*256, 256) },  1);

b_tmp.query; //ok
//b.query;     //not ok, gives error
)

//I hear nothing with line below!!  --code is from
Buffer.help example
a = { VOsc.ar(SinOsc.kr(0.5, 0, 3.4, 3.5), [400], 0,
0.2) }.play;
		
a.free; 

b.do(_.free);
///////////////////////


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com