Hey all,
I am playing around with NFM. I have a question about bases.
I have an 8 minute file that I am breaking up into “grains”, each about 1 second long. I am then doing an NMF on each of these grains in order.
Tell me if I am understanding this correctly: If I set the bases mode to 0, then each of the sound files will have its own NMF analysis, and the order of the channels in the resynthesis will be rando. If I set the bases mode to 1, and pass in the analysis of the previous file, each file with “morph” the NMF bases and the resulting resynthesis, giving me a gradually changing spectrum in the bases/resynthesis over time.
Correct or no? Code is below. I guess another question is when to set the bases mode to 1. Does it need to have a “good thing going” already?
Sam
(
var files;
e = Buffer.new(s);
f = Buffer.new(s);
g = Buffer.new(s);
files = PathName("/Volumes/Rugged/Mahler/NMF/MahlerNorm/Left/").files;
{
files.do{|item, i|
a = Buffer.read(s, item.fullPath);
s.sync;
FluidBufNMF.process(s, a, resynth:e, bases: f, activations:g, components:20, action:{|resyn, bases, act|
(“done”+i).postln;
resyn.write("/Volumes/Rugged/Mahler/NMF/MahlerNorm/Lnmf/Lresyn_20_"++i++".wav", “wav”, “float”);
bases.write("/Volumes/Rugged/Mahler/NMF/MahlerNorm/Lnmf/Lbases_20_"++i++".wav", “wav”, “float”);
act.write("/Volumes/Rugged/Mahler/NMF/MahlerNorm/Lnmf/Lact_20_"++i++".wav", “wav”, “float”);
});
s.sync;
a.free;
s.sync;
}
}.fork;
)