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 b29e3d1..166f75e 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 @@ -115,7 +115,7 @@ Routine{ ~head = ~head + step; "-----------------".postln; }); - //leftovers + //leftovers (half baked, needs to run it all properly but hey, let's fix it first if ( (~originalslicesarray.size - ~head) > 1, { //run a process on (a.size - ~head) items from ~head (~originalslicesarray.size - ~head - 1).do{|i| @@ -123,6 +123,9 @@ Routine{ // (~head+i).postln; }; }); + //add the endoffile indice to the array + ~indices = ~indices ++ (b.numFrames); + ~indices.postln; }.play; ) @@ -131,3 +134,32 @@ Routine{ {var i = 4;BufRd.ar(1,b,Line.ar(~indices[i],~indices[i+1],(~indices[i+1] - ~indices[i])/b.sampleRate, doneAction: 2))}.play; //export to reaper +( +//first create a new file that ends with rpp - it will overwrite if the file exists +f = File.new("/tmp/clusteredslices.rpp","w+"); + +if (f.isOpen , { + //write the header + f.write("\n>\n");}; + //write the track footer + f.write(">\n"); + + // a second track with the new ~indices + //write the track header + f.write("\n>\n");}; + //write the track footer + f.write(">\n"); + + //write the footer + f.write(">\n"); + f.close; +}); +)