with efficiency testing
parent
a783c4af61
commit
99e81fc6ad
@ -1,26 +1,14 @@
|
||||
s.quit
|
||||
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");
|
||||
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
|
||||
////////////////////////////
|
||||
// test for efficiency
|
||||
|
||||
// run the code
|
||||
b.fdNMF(e,5, 100, 1024,1024,256,{|x| "itworks".postln; x.postln;})
|
||||
|
||||
// read to check
|
||||
e.plot;
|
||||
{Splay.ar(PlayBuf.ar(5,e.bufnum,doneAction:2))}.play
|
||||
b = Buffer.read(s,"/Users/pa/Documents/documents@hudd/research/projects/fluid corpus navigation/research/denoise_stn/sources/01-mix.wav");
|
||||
b.play;
|
||||
c = Buffer.alloc(s,b.numFrames,5);
|
||||
d = Main.elapsedTime; b.fdNMF(c,5, 100, 1024,1024,256,{e = Main.elapsedTime; (e-d).postln})
|
||||
|
||||
// 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