SuperCollider code for 8-channel composition exhibited in 2020 at Steklenik gallery run by CONA institute.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

364 lines
12 KiB

(/*
Copyright (c) 2020 Luka Prinčič, All rights reserved.
This program is free software distributed under
GNU General Public Licence. See COPYING for more info.
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
// RHIZOSPHERE - STEKLENIK 2020 - CONA //////////////////////////////////////////////
██████╗ ██╗ ██╗██╗███████╗ ██████╗ ███████╗██████╗ ██╗ ██╗███████╗██████╗ ███████╗
██╔══██╗██║ ██║██║╚══███╔╝██╔═══██╗██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗██╔════╝
██████╔╝███████║██║ ███╔╝ ██║ ██║███████╗██████╔╝███████║█████╗ ██████╔╝█████╗
██╔══██╗██╔══██║██║ ███╔╝ ██║ ██║╚════██║██╔═══╝ ██╔══██║██╔══╝ ██╔══██╗██╔══╝
██║ ██║██║ ██║██║███████╗╚██████╔╝███████║██║ ██║ ██║███████╗██║ ██║███████╗
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝
*/
Server.default.waitForBoot {
// library path
var libPath = PathName(thisProcess.nowExecutingPath.dirname +/+ "lib");
"\n\n\n=============================================================".postln;
"\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>".postln;
"--- R H I Z O S P H E R E -----".postln;
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n".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);
});
});
s.meter;
s.plotTree;
//free runaway synth:
s.sendMsg(\n_free, 1553)
//////////////////////////////////////////////////////////////////////////////////
// P E R F O R M A N C E /////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
// BUFFERS and RECORDERS
// buffers are stored during server's boot, across CTRL-dot.
b = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
c = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
d = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
e = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
Synth(\recIn, [\bufnum, b]);
b.normalize;
Synth(\recIn, [\bufnum, c]);
c.normalize;
Synth(\recIn, [\bufnum, d]);
d.normalize;
Synth(\recIn, [\bufnum, e]);
e.normalize;
b.plot
c.plot
d.plot
e.plot
// ============================================================================
// granulatorz.
~grainb = Synth(\bgrain, [\out, ~reverBus, \bufnum, b, \amp, 0.01]);
~grainb.set(\amp, 0.5, \amplag, 10)
~grainb.set(\rate, 2)
~grainb.set(\out, ~octoBus1)
~grainb.release(3)
~grainc = Synth(\bgrain, [\out, ~reverBus, \bufnum, c, \amp, 0.01]);
~grainc.set(\amp, 0.02, \amplag, 10)
~grainc.set(\rate, 2)
~grainc.release(10)
~graind = Synth(\bgrain, [\out, ~reverBus, \bufnum, d, \amp, 0.01]);
~graind.set(\amp, 0.5, \amplag, 10)
~graind.release(10)
~graine = Synth(\bgrain, [\out, ~reverBus, \bufnum, e, \amp, 0.01]);
~graine.set(\amp, 0.1, \amplag, 10)
~graine.release(10)
// noise Cracle
~noiseCr1 = Synth(\noiseCrackle, [\out, ~octoBus1, \fadeTime, 30, \lpfa, 1, \hpfa, 0 ]);
~noiseCr1.set(\rq, 0.98);
~noiseCr1.set(\lpfa, 1);
~noiseCr1.set(\hpfa, 1);
~noiseCr1.set(\gate, 0, \fadeTime, 10);
~noiseCr1.release(1)
~noiseCr1.free;
~noiseCr2 = Synth(\noiseCrackle, [\out, ~octoBus2, \fadeTime, 30, \lpfa, 1, \hpfa, 0 ]);
~noiseCr2.set(\gate, 0, \fadeTime, 20);
~noiseCr2.free;
~noiseCr3 = Synth(\noiseCrackle, [\out, ~octoBus3, \fadeTime, 30, \lpfa, 0, \hpfa, 1 ]);
~noiseCr3.set(\gate, 0, \fadeTime, 1);
~noiseCr3.free;
~noiseCr4 = Synth(\noiseCrackle, [\out, ~octoBus4, \fadeTime, 30, \lpfa, 0, \hpfa, 1 ]);
~noiseCr4.set(\gate, 0, \fadeTime, 1);
~noiseCr4.free;
( // free them all at once
~noiseCr1.free;
~noiseCr2.free;
~noiseCr3.free;
~noiseCr4.free;
)
~henonS1 = Synth(\henonSynth1, [\out, ~octoBus3, \amp, 0.4, \fadeTime, 4]);
~henonS1.set(\amp, 1);
~henonS1.set(\hpff, 200);
~henonS1.set(\lpff, 200);
~henonS1.release(10);
~henonS1.free;
~henonS2 = Synth(\henonSynth1, [\out, ~octoBus4, \amp, 0.4, \fadeTime, 4]);
~henonS2.set(\amp, 1);
~henonS2.set(\out, ~octoBus4);
~henonS2.set(\gate, 0, \fadeTime, 10);
~henonS2.free;
~darkHenon1 = Synth(\henonLsynth2, [\out, ~octoBus1, \fadeTime, 10]);
~darkHenon1.set(\gate, 0, \fadeTime, 10);
~darkHenon1.set(\amp, 0.1);
~darkHenon1.release(10);
~darkHenon1.free;
~darkHenon2 = Synth(\henonLsynth2, [\out, ~octoBus2, \fadeTime, 10]);
~darkHenon2.set(\amp, 1);
~darkHenon2.set(\gate, 0, \fadeTime, 3);
~darkHenon2.release(30);
~darkHenon2.free;
// SOIL
~soil1 = Synth(\granSoil, [\out, ~octoBus1, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
~soil1durBus = Bus.control(s,1);
~soil1durBus.value = 0.001;
~soil1.map(\dur, ~soil1durBus);
~soil1DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil1durBus, SinOsc.kr(0.012,1.5pi).range(0.0001, 0.05))} ).play;
~soil1DurOsc.free;
~soil1.set(\amp, 0.5);
~soil1.set(\gate, 0, \fadeTime, 15); // use envelope to fade out
~soil1.release(15);
~soil1.free;
//
~soil2 = Synth(\granSoil, [\out, ~octoBus2, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
~soil2durBus = Bus.control(s,1);
~soil2durBus.value = 0.0001;
~soil2.map(\dur, ~soil2durBus);
~soil2DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil2durBus, SinOsc.kr(0.029,1.5pi).range(0.0001, 0.08))} ).play;
~soil2DurOsc.free;
~soil2.release(15);
//
~soil3 = Synth(\granSoil, [\out, ~octoBus3, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
~soil3durBus = Bus.control(s,1);
~soil3durBus.value = 0.0001;
~soil3.map(\dur, ~soil3durBus);
~soil3DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil3durBus, SinOsc.kr(0.029,1.5pi).range(0.0001, 0.08))} ).play;
~soil3DurOsc.free;
~soil3.release(15);
//
~soil4 = Synth(\granSoil, [\out, ~octoBus4, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
~soil4durBus = Bus.control(s,1);
~soil4durBus.value = 0.01;
~soil4.map(\dur, ~soil4durBus);
~soil4DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil4durBus, SinOsc.kr(0.029,1.5pi).range(0.0001, 0.08))} ).play;
~soil4DurOsc.free;
~soil4.release(15);
// MARKOV NOISES +
~latooWan1 = Synth(\latooWanderings, [\out, ~octoBus4, \fadeTime, 30, \amp, 0.3]);
~latooWan1.release(3);
~markov1 = Synth(\markovS1, [ \out, ~octoBus1, \freq, 440, \tsize, 3, \amp, 0.3, \clip, 0.69, \fadeTime, 0.01 ]);
~markov1.release(0.01);
~distbleeps = Synth(\latooTriggers, [\out, ~octoBus3, \trigA, 1.1, \fadeTime, 0.01, \amp, 0.9]);
~distbleeps.release(10);
~markov7 = Synth(\markovS1, [ \out, ~octoBus2, \freq, 740, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 7 ]);
~markov7.release(0.01)
~markov9 = Synth(\markovS1, [ \out, ~octoBus1, \freq, 1940, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 0.01 ]);
~markov9.release(0.01)
(
~markov10 = Synth(\markovS1, [ \out, ~octoBus4, \freq, 501, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 0.01 ]);
~markov11 = Synth(\markovS1, [ \out, ~octoBus3, \freq, 1101, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 0.01 ]);
~markov12 = Synth(\markovS1, [ \out, ~octoBus2, \freq, 3001, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 0.01 ]);
)
(
var rel=0.1;
~markov10.release(rel);
~markov11.release(rel);
~markov12.release(rel);
)
// TRIG RINGS
~lorenzTrig1 = Synth(\lorenzTrigRing, [\out, ~octoBus1, \freq, 1400, \amp, 0.5, \fadeTime, 0]);
~lorenzTrig1.set(\amp, 1); // use set fadeTime - set \gate = 0?
~lorenzTrig1.release; // use set fadeTime - set \gate = 0?
~lorenzTrig1.release(30); // use set fadeTime - set \gate = 0?
~lorenzTrig1.set(\fadeTime, 10, \gate, 0);
~lorenzTrig1.free
~stdTrig1 = Synth(\stndTrigRing, [\out, ~octoBus2, \freq,1900, \amp,0.5,\fadeTime, 10]);
~stdTrig1.release(30);
~stdTrig1.free
~lorenzTrig2 = Synth(\lorenzTrigRing, [\out, ~octoBus3, \freq, 400, \amp, 0.3, \fadeTime, 10, \min, 5, \max, 20]);
~lorenzTrig2.release(30);
~stdTrig2 = Synth(\stndTrigRing, [\freq, 70, \min, 0, \max, 2, \decay, 2, \ffreq, 200, \amp, 0.4, \out, ~octoBus4, \fadeTime, 20]) ;
~stdTrig2.release(30);
~henoTrig1 = Synth(\henoTrigRing, [\out, ~octoBus2, \freq, 2700, \amp, 1, \min, 0.1, \max, 1, \fadeTime, 20]);
~henoTrig1.release(30);
// 139Hz
~gbmanTrig1 = Synth(\gbmanTrigRing, [\out, ~octoBus1, \freq, 139, \decay, 2, \min, 0.2, \max, 1, \amp, 0.4, \fadeTime, 2]);
~gbmanTrig1.release(30);
// 3300Hz
~latooTrig1 = Synth(\latooTrigRing, [\out, ~octoBus4, \freq, 3300, \decay, 3, \min, 0.2, \max, 1, \amp, 0.2, \fadeTime, 10 ]);
~latooTrig1.release(30);
// 4300Hz
~latooTrig2 = Synth(\latooTrigRing, [\out, ~octoBus3, \freq, 4300, \decay, 0.2, \min, 1, \max, 10, \amp, 0.2, \fadeTime, 10 ]);
~latooTrig2.set(\out, ~octoBus4)
~latooTrig2.release(30)
// 210Hz
~fhnTrig1 = Synth(\fhnTrigRing, [\out, ~octoBus2, \freq, 210, \amp, 0.5, \decay, 2, \min, 0.2, \max, 1, \amp, 0.4, \fadeTime, 10]);
~fhnTrig1.release(30);
// 200Hz
~fhnTrig3 = Synth(\fhnTrigRing, [\out, ~octoBus2, \freq, 200, \amp, 0.5, \decay, 2, \min, 0.2, \max, 1, \amp, 0.4, \fadeTime, 10]);
~fhnTrig3.release(30);
// 2110
~fhnTrig2 = Synth(\fhnTrigRing, [\out, ~octoBus1, \freq, 2110, \amp, 0.5, \min, 2, \max, 20, \amp, 0.5, \fadeTime, 10]);
~fhnTrig2.set(\ffreq, 8000, \ffreqlag, 20)
~fhnTrig2.release(60)
~fhnTrig2 = Node.basicNew(nodeID:1369)
~fmgrainer = Routine { 200.do({ x = Synth(\fm_grainer, [ "modfreq", rrand(10,1000), "carfreq", rrand(40,100), \out, ~octoBus1 ]); 1.wait; }); "--- fmgrains done generating new ones ...".postln; }.play;
// this one will fade out by itself at some point
// back to SOIL - outro + henonS1?
~soil1 = Synth(\granSoil, [\out, ~octoBus1, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
~soil1durBus = Bus.control(s,1);
~soil1durBus.value = 0.001;
~soil1.map(\dur, ~soil1durBus);
~soil1DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil1durBus, SinOsc.kr(0.012,1.5pi).range(0.0001, 0.05))} ).play;
~soil1DurOsc.free;
~soil1.set(\amp, 0.1)
~soil1.set(\gate, 0, \fadeTime, 15); // use envelope to fade out
~soil1.release(30);
~soil1.free;
//
~soil2 = Synth(\granSoil, [\out, ~octoBus2, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
~soil2durBus = Bus.control(s,1);
~soil2durBus.value = 0.0001;
~soil2.map(\dur, ~soil2durBus);
~soil2DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil2durBus, SinOsc.kr(0.029,1.5pi).range(0.0001, 0.08))} ).play;
~soil2DurOsc.free;
~soil2.release(15);
//
~henonS1 = Synth(\henonSynth1, [\out, ~octoBus3, \amp, 0.4, \fadeTime, 4]);
~henonS1.set(\amp, 0.90);
~henonS1.set(\hpff, 1000);
~henonS1.set(\lpff, 50);
~henonS1.release(10);
~henonS1.free;
//
~henonS2 = Synth(\henonSynth1, [\out, ~octoBus3, \amp, 0.4, \fadeTime, 4]);
~henonS2.set(\amp, 0.05);
~henonS2.set(\hpff, 200);
~henonS2.set(\lpff, 200);
~henonS2.release(40)
~henonS2.free;
// helper for nodes without object
~lorenzTrig1 = Node.basicNew(s, 1354)
s.sendMsg(\n_free, 1590)
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -