BufNMF has clean fixed W code, HPSS too.

nix
Pierre Alexandre Tremblay 7 years ago
parent bfecf11784
commit 1ceecce8ae

@ -184,36 +184,31 @@ Routine {
{(PlayBuf.ar(10,c.bufnum).sum)+(-1*PlayBuf.ar(1,y.bufnum))}.play {(PlayBuf.ar(10,c.bufnum).sum)+(-1*PlayBuf.ar(1,y.bufnum))}.play
// find the picking // find the picking
{PlayBuf.ar(10,c.bufnum)[8]}.play {PlayBuf.ar(10,c.bufnum)[2]}.play
// copy all the other ranks on itself (the 5 above is omited from the array and is in the 2nd compose // copy all the other ranks on itself (the 2 above is omited from the array and is in the 2nd compose
( (
Routine{ Routine{
[ 0, 1, 2, 3, 5, 6, 7, 8, 9 ].do({|chan|FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA:chan, nChansA: 1, srcBufNumB: e.bufnum, dstBufNum: e.bufnum)}); [ 0, 1, 3, 4, 5, 6, 7, 8, 9 ].do({|chan|FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA:chan, nChansA: 1, srcBufNumB: e.bufnum, dstBufNum: e.bufnum)});
s.sync; s.sync;
e.query; e.query;
s.sync; s.sync;
FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA: 5, nChansA: 1, srcBufNumB: e.bufnum, dstStartChanB: 1, dstBufNum: e.bufnum); FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA: 2, nChansA: 1, srcBufNumB: e.bufnum, dstStartChanB: 1, dstBufNum: e.bufnum);
s.sync; s.sync;
e.query; e.query;
}.play; }.play;
) )
// hypothesis 2
e = Buffer.alloc(s,1,1);
FluidBufCompose.process(s,srcBufNumA: x.bufnum, startChanA: 8, nChansA: 1, srcBufNumB: x.bufnum, startChanB: 0, nChansB: 1, dstStartChanB: 1, dstBufNum: e.bufnum);
e.query
e.plot
//process //process
( (
Routine{ Routine{
FluidBufNMF.process(s, b.bufnum, dstBufNum: c.bufnum, dictBufNum: x.bufnum, dictFlag: 2, actBufNum:y.bufnum, rank:10); FluidBufNMF.process(s, b.bufnum, dstBufNum: c.bufnum, dictBufNum: e.bufnum, dictFlag: 2, actBufNum:y.bufnum, rank:2);
s.sync; s.sync;
c.query; c.query;
}.play; }.play;
) )
c.play c.play
e.plot
y.query
y.plot y.plot
y.getn(0,100,{|x|x.postln})

@ -118,7 +118,7 @@ namespace hpss{
}; };
std::map<std::string, Constraint> paramConstraints{ std::map<std::string, Constraint> paramConstraints{
{"ptf1",{"pthreshf2", std::less<double>()}}, {"ptf1",{"ptf2", std::less<double>()}},
{"htf1",{"htf2", std::less<double>()}}, {"htf1",{"htf2", std::less<double>()}},
{"ptf2",{"ptf1", std::greater<double>()}}, {"ptf2",{"ptf1", std::greater<double>()}},
{"htf2",{"htf1", std::greater<double>()}} {"htf2",{"htf1", std::greater<double>()}}

@ -6,9 +6,11 @@ b.play
// basic param // basic param
{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1))}.play {FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1))}.play
// sexier params // params in mode 1
{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),17,31,0,0,1024,512,2048)}.play {FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),17,31,1,0.05,40,0.1,-40)}.play
// params in mode 2
{FluidHPSS.ar(PlayBuf.ar(1,b.bufnum,loop:1),17,31,2,0.05,40,0.1,-40, 0.1, -10, 0.2, 10)}.play

Loading…
Cancel
Save