with efficiency testing
parent
a783c4af61
commit
99e81fc6ad
@ -1,26 +1,14 @@
|
|||||||
s.quit
|
s.quit
|
||||||
s.boot
|
s.boot
|
||||||
// allocates a 16-sample buffer and fills it with ascending values
|
////////////////////////////
|
||||||
b = Buffer.read(s,"/Applications/Max.app/Contents/Resources/C74/media/msp/jongly.aif");
|
// test for efficiency
|
||||||
b.play;
|
|
||||||
b.plot;
|
|
||||||
c = Buffer.alloc(s,b.numFrames,2);
|
|
||||||
e = Buffer.alloc(s,b.numFrames,5);
|
|
||||||
|
|
||||||
// run the code
|
|
||||||
b.fdNMF(c,2)
|
|
||||||
|
|
||||||
// read to check
|
|
||||||
c.plot;
|
|
||||||
{PlayBuf.ar(2,c.bufnum,doneAction:2)}.play
|
|
||||||
|
|
||||||
// run the code
|
b = Buffer.read(s,"/Users/pa/Documents/documents@hudd/research/projects/fluid corpus navigation/research/denoise_stn/sources/01-mix.wav");
|
||||||
b.fdNMF(e,5, 100, 1024,1024,256,{|x| "itworks".postln; x.postln;})
|
b.play;
|
||||||
|
c = Buffer.alloc(s,b.numFrames,5);
|
||||||
// read to check
|
d = Main.elapsedTime; b.fdNMF(c,5, 100, 1024,1024,256,{e = Main.elapsedTime; (e-d).postln})
|
||||||
e.plot;
|
|
||||||
{Splay.ar(PlayBuf.ar(5,e.bufnum,doneAction:2))}.play
|
|
||||||
|
|
||||||
// nulltest
|
{(PlayBuf.ar(5,c.bufnum,doneAction:2).sum)+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play
|
||||||
|
{Splay.ar(PlayBuf.ar(5,c.bufnum,doneAction:2))}.play
|
||||||
|
|
||||||
{(PlayBuf.ar(5,e.bufnum,doneAction:2).sum)+(-1*PlayBuf.ar(1,b.bufnum,doneAction:2))}.play
|
{PlayBuf.ar(5,c.bufnum,doneAction:2)[0].dup}.play
|
||||||
Loading…
Reference in New Issue