// LOADS ALL .scd files in lib/ folder and samples in smp/ folder // library path var libPath = PathName(thisProcess.nowExecutingPath.dirname +/+ "lib"); // samples path var smpPath = PathName(thisProcess.nowExecutingPath.dirname +/+ "smp"); // load samples "\n--- load samples: ...".postln; // free all buffers to restart buffer count ~smpBuffers.do(_.free); // create Dictionary ~smpBuffers = Dictionary(); // iterate over each file in the folder smpPath.filesDo({ |smpfile,i| // tell me what you are loading: postln(" " + i + smpfile.fileName ); // add a sample into a buffer, store object to Dictionary ~smpBuffers.add(smpfile.fileName -> Buffer.readChannel(s, smpfile.fullPath, channels:[0])); }); // load libs "\n--- load libs: ...".postln; // for each files in that lib folder libPath.filesDo({|afile| // tell me what you're executing: postln(" ." + afile.fileName); // execute it: this.executeFile(afile.fullPath); }); //"\n\n=== \n".postln;