« Return to Thread: NRT Buffer Filling

Re: NRT Buffer Filling

by Jesper Elén :: Rate this Message:

Reply to Author | View in Thread

Try with
~blackman = Buffer.loadCollection(s, sig, 1);
~blackman.plot;

Jesper

22 apr 2009 kl. 04.46 skrev Scott Worthington:

I'm wondering if there is an easy way and/or how one would fill a Buffer with something like the following for NRT use.

(
//Blackman Window
var sig, size, alpha, a0, a1, a2;
size = 2048;
alpha = 0.16;
sig = Signal.newClear(size);

a0 = 0.5*(1-alpha);
a1 = 0.5;
a2 = alpha*0.5;

sig.waveFill( { arg x, i; a0 - (a1*cos( (2*pi*x)/(size-1) ) ) + (a2*cos( (4*pi*x)/(size-1) ) )}, 0, size );
~blackman = Buffer.sendCollection(s, sig, 1);
)


I'm not sure how this is done with the \b_alloc messages and such.

Thanks very much,
sw



--
Scott Worthington
stwbass@...
www.scottworthington.com

Jesper Elén
Studio Manager
Visby International Centre for Composers
Skeppsbron 18, 621 57 Visby, Sweden
+46 705 249914
+46 498 249904
+46 498 249900 ( also fax )

 « Return to Thread: NRT Buffer Filling