added old example files for human testing to tests folder

nix
Ted Moore 4 years ago
parent 930858bd08
commit e663a62e98

@ -11,7 +11,7 @@
~flatbuf = 4.collect{Buffer.new};
// here we instantiate a loader as per example 0
~loader = FluidLoadFolder(File.realpath(FluidBufMFCC.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/");
~loader = FluidLoadFolder(FluidFilesPath());
// here we instantiate a further slicing step as per example 0
~slicer = FluidSliceCorpus({ |src,start,num,dest|

@ -1,6 +1,6 @@
//load a part of a sound that has 3 clear components: a clear pitch component to start, a noisy pitchless ending and DC offset silence on both ends
(
b = Buffer.read(s,File.realpath(FluidBufPitch.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/Tremblay-ASWINE-ScratchySynth-M.wav",42250,44100);
b = Buffer.read(s,FluidFilesPath("Tremblay-ASWINE-ScratchySynth-M.wav"),42250,44100);
~pitches = Buffer(s);
~stats = Buffer(s);
~loud = Buffer(s);

@ -1,5 +1,5 @@
// load a source folder
~loader = FluidLoadFolder(File.realpath(FluidBufMFCC.class.filenameSymbol).dirname.withTrailingSlash ++ "../AudioFiles/");
~loader = FluidLoadFolder(FluidFilesPath());
~loader.play;
//slightly oversegment with novelty
@ -102,15 +102,18 @@ t = Main.elapsedTime;
(
~windowedFunct = {arg head, winSize, overlap;
var nbass = [], assignments = [], tempDict = ();
"windowedFunct".postln;
//check the size of everything to not overrun
winSize = (~originalslicesarray.size - head).min(winSize);
//copy the items to a subdataset from hear
winSize.do{|i|
"winSize %\n".postf(i);
tempDict.put((i.asString), ~sliceDict["data"][(~orginalkeys[(i+head)]).asString]);//here one could curate which stats to take
// "whichslices:%\n".postf(i+head);
};
"sliceDict cols: %\n".postf(~sliceDict["cols"]);
~windowDS.load(Dictionary.newFrom([\cols, ~sliceDict["cols"].asInteger, \data, tempDict]), action: {
// "% - loaded\n".postf(head);
"% - loaded\n".postf(head);
//kmeans 2 and retrieve ordered array of class assignations
~kmeans.fitPredict(~windowDS, ~windowLS, action: {|x|

@ -9,7 +9,7 @@ s.reboot
//We'll jam together some random flucoma sounds for illustrative purposes
//Get some files
(
~audioexamples_path = File.realpath(FluidBufMelBands.class.filenameSymbol).dirname.withTrailingSlash +/+ "../AudioFiles/*.wav";
~audioexamples_path = FluidFilesPath()+/+"*.wav";
~allTheSounds = SoundFile.collect(~audioexamples_path);
~testSounds = ~allTheSounds;
~testSounds.do{|f| f.path.postln}; // print out the files that are loaded
@ -224,7 +224,7 @@ fork{
~stdmels = FluidDataSet(s);//will standardised, pruned mel data
~standardizer = FluidStandardize(s);
~pruner = FluidDataSetQuery(s);
~tree = FluidKDTree(s,numNeighbours:10,lookupDataSet:~slicedata);//we have to supply the lookup data set when we make the tree (boo!)
~tree = FluidKDTree(s,numNeighbours:10);//we have to supply the lookup data set when we make the tree (boo!)
)
//Prune, standardize and fit KDTree

@ -4,7 +4,7 @@ s.reboot;
~raw = FluidDataSet(s);
~norm = FluidDataSet(s);
~retrieved = FluidDataSet(s);
~audio = Buffer.read(s,File.realpath(FluidBufMelBands.class.filenameSymbol).dirname +/+ "../AudioFiles/Tremblay-ASWINE-ScratchySynth-M.wav");
~audio = Buffer.read(s,FluidFilesPath("Tremblay-ASWINE-ScratchySynth-M.wav"));
~melfeatures = Buffer.new(s);
~stats = Buffer.alloc(s, 7, 40);
~datapoint = Buffer.alloc(s, 40);

Loading…
Cancel
Save