diff --git a/release-packaging/Examples/dataset/1-learning examples/12-windowed-clustered-segmentation.scd b/release-packaging/Examples/dataset/1-learning examples/12-windowed-clustered-segmentation.scd index eb9ea87..00182af 100644 --- a/release-packaging/Examples/dataset/1-learning examples/12-windowed-clustered-segmentation.scd +++ b/release-packaging/Examples/dataset/1-learning examples/12-windowed-clustered-segmentation.scd @@ -51,6 +51,7 @@ t = Main.elapsedTime; ~extractor.play(s,~loader.buffer, ~slicer.index, action:{(Main.elapsedTime - t).postln;"Analysis done".postln}); ) +~originalindices.size ~slicesMFCC.print ~slicesShapes.print @@ -94,7 +95,7 @@ t = Main.elapsedTime; //retrieve the dataset as dictionary ~curated.dump{|x|~sliceDict = x;}; -~originalslicesarray = (~originalindices.flatten ++ ~loader.buffer.numFrames).asSet.asArray.sort +~originalslicesarray = ~originalindices.flop[0] ++ ~loader.buffer.numFrames ~orginalkeys = Array.newFrom(~slicer.index.keys).sort{|a,b| ~slicer.index[a][\bounds][0]< ~slicer.index[b][\bounds][0]} //the windowed function, recursive to deal with sync dependencies @@ -174,7 +175,7 @@ t = Main.elapsedTime; f = File.new("/tmp/clusteredslices-" ++ Date.getDate.stamp ++".rpp","w+"); if (f.isOpen , { - var path, prevpath ="", sr, count, dur; + var path, prevpath ="", sr, count, dur, realDur; //write the header f.write(" 0, { + path = ~slicer.index[v][\path]; + if (path != prevpath, { + sr = ~slicer.index[v][\sr]; + prevpath = path; + count = 0; + }); f.write("\n>\n"); + count = count + dur; }); - count = count + dur; }; //write the track footer f.write(">\n"); @@ -225,4 +226,5 @@ if (f.isOpen , { }); ) -(then open the time-stamped reaper file clusterdslice in the folder tmp) \ No newline at end of file +(then open the time-stamped reaper file clusterdslice in the folder tmp) +"open /tmp".unixCmd \ No newline at end of file diff --git a/release-packaging/Examples/dataset/1-learning examples/13-massive-parallelisation-example.scd b/release-packaging/Examples/dataset/1-learning examples/13-massive-parallelisation-example.scd index 3eed22c..81b960d 100644 --- a/release-packaging/Examples/dataset/1-learning examples/13-massive-parallelisation-example.scd +++ b/release-packaging/Examples/dataset/1-learning examples/13-massive-parallelisation-example.scd @@ -86,11 +86,11 @@ fork{ ~slices.put("data",Dictionary()); //Collect each set of onsets into a language side array and store them in a dict - ~index_buffers.do{|b,i| // iterate over the 4 buffers + ~index_buffers.do{|b,i| // iterate over the input buffer array { b.loadToFloatArray( // load to language side array action:{|indices| - //Glue the first and last samples of the buffer on to the index list, and place in dictionary wiht the + //Glue the first and last samples of the buffer on to the index list, and place in dictionary with the //Buffer object as a key index_arrays.put(~audio_buffers[i], Array.newFrom([0] ++ indices ++ (~audio_buffers[i].numFrames - 1))); @@ -114,7 +114,6 @@ fork{ index_arrays.keysValuesDo{|buffer, indices| indices.doAdjacentPairs{|start,end,num| var analysis = Routine({|counter| - FluidBufMelBands.processBlocking( server:s, source:buffer,