
|
NRT Buffer Filling
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
|

|
Re: NRT Buffer Filling
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 )
|

|
Re: NRT Buffer Filling
How would I add something like this into a Score? Thanks, sw On Wed, Apr 22, 2009 at 12:38 AM, Jesper Elén <jesper.elen@...> wrote:
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 )
-- Scott Worthington stwbass@...
www.scottworthington.com
|

|
Re: NRT Buffer Filling
( //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 );
// your OSC message z = [0, [\b_alloc, 0, 2048, 1, [\b_setn, 0, 0, 2048] ++ sig]] )
// z is the message to put into your score score.add(z); // etc ...
OR - you can save your signal out to a soundfile, then just read it in with \b_allocRead.
Hope that helps.
Josh
On Apr 22, 2009, at 8:12 AM, Scott Worthington wrote: How would I add something like this into a Score?
Thanks, sw
On Wed, Apr 22, 2009 at 12:38 AM, Jesper Elén <jesper.elen@...> wrote: 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 )
-- Scott Worthington stwbass@... www.scottworthington.com
****************************************** /* Joshua D. Parmenter http://www.realizedsound.net/josh/
“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono */
|

|
Re: NRT Buffer Filling
Thanks twice! sw On Wed, Apr 22, 2009 at 1:27 PM, Josh Parmenter <josh@...> wrote:
( //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 );
// your OSC message z = [0, [\b_alloc, 0, 2048, 1, [\b_setn, 0, 0, 2048] ++ sig]]
)
// z is the message to put into your score
score.add(z); // etc ...
OR - you can save your signal out to a soundfile, then just read it in with \b_allocRead.
Hope that helps.
Josh
On Apr 22, 2009, at 8:12 AM, Scott Worthington wrote: How would I add something like this into a Score?
Thanks, sw
On Wed, Apr 22, 2009 at 12:38 AM, Jesper Elén <jesper.elen@...> wrote:
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 )
-- Scott Worthington stwbass@...
www.scottworthington.com
******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/
“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono
*/ -- Scott Worthington stwbass@...www.scottworthington.com
|

|
Re: NRT Buffer Filling
~score.add( [0,
[\b_alloc, ~blackman.bufnum, size ],
[\b_setn, ~blackman.bufnum, 0, size, sig].flatten
] );
stwbass wrote:
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@gmail.com
www.scottworthington.com
|