algoforte03a/00_init.scd

96 lines
2.2 KiB
Plaintext
Raw Normal View History

2023-04-30 23:26:19 +02:00
fork {
var libPath, smpPath;
// be nice, say hi.
post("\n\n\n\n\n");
30.do({post("- ")});
postln ("\nhello. this is algoforte 03 project.");
30.do({post("- ");0.05.wait;});
post("\n");
smpPath = PathName.new(
PathName.new(thisProcess.nowExecutingPath).pathOnly +/+ "smp/");
~granSmp = smpPath.files;
~granBfrList = List();
~granBfr = List();
Buffer.freeAll(s);
postln("\n--- recording buffers init ...");
// buffer for recording
~pBuf1 = Buffer.alloc(s, s.sampleRate * 4, 2);
~pBufMono1 = Buffer.alloc(s, s.sampleRate * 4);
0.2.wait;
postln(" \n~~~ loading soundfiles ..." );
~granSmp.do({ |item, i|
postln(" " + i + "" + item.folderName +/+ item.fileName);
~granBfrList.add(item.fileName);
~granBfr.add(Buffer.readChannel(s, item.fullPath, channels:[0]));
// [0] forces mono!
});
0.2.wait;
postln("\n--- loading libs ...");
libPath = PathName.new(
PathName.new(thisProcess.nowExecutingPath).pathOnly +/+ "lib/");
libPath.filesDo({|afile|
// for each file in list, load/execute it
postln(">>> loading file: " + afile.folderName +/+ afile.fileName);
this.executeFile(afile.fullPath);
});
0.2.wait;
postln("\n--- creating busses ...");
~fxJPverbBus1.free; ~fxJPverbBus1 = Bus.audio(s, 2);
~fxGverbBus1.free; ~fxGverbBus1 = Bus.audio(s, 2);
~fxFeedDelayBus1.free; ~fxFeedDelayBus1 = Bus.audio(s, 2);
~fxDelayWarpBus1.free; ~fxDelayWarpBus1 = Bus.audio(s, 2);
0.2.wait;
postln("\n--- loading effects ...");
postln("\n--- please wait (FAILURE IN SERVER errors are ok here) ...");
0.5.wait;
~fxJPverb1.free;
~fxJPverb1 = Synth( \fxJPverb,
[\in, ~fxJPverbBus1, \wet, 3, \decay, 5],
addAction:\addToTail);
0.2.wait;
~fxGverb1.free;
~fxGverb1 = Synth( \fxGverb,
[\in, ~fxGverbBus1, \early, 0.1, \tail, 0.7, \decay, 10],
addAction:\addToTail);
0.2.wait;
~fxFeedDelay1.free;
~fxFeedDelay1 = Synth( \fxFeedDelay,
[\in, ~fxFeedDelayBus1, \feedback, 0.99, \time, 2],
addAction:\addToTail);
0.2.wait;
~fxDelayWarp1.free;
~fxDelayWarp1 = Synth( \fxDelayWarp,
[\in, ~fxDelayWarpBus1, \wet, 0.5],
addAction:\addToTail);
0.5.wait;
postln("\n--- done loading effects.");
30.do({post("- ");0.05.wait;});
postln("\n~~~ readyForPlay.\n\n\n");
};