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

1 year ago
  1. (/*
  2. Copyright (c) 2020 Luka Prinčič, All rights reserved.
  3. This program is free software distributed under
  4. GNU General Public Licence. See COPYING for more info.
  5. - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  6. // RHIZOSPHERE - STEKLENIK 2020 - CONA //////////////////////////////////////////////
  7. ██████╗ ██╗ ██╗██╗███████╗ ██████╗ ███████╗██████╗ ██╗ ██╗███████╗██████╗ ███████╗
  8. ██╔══██╗██║ ██║██║╚══███╔╝██╔═══██╗██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗██╔════╝
  9. ██████╔╝███████║██║ ███╔╝ ██║ ██║███████╗██████╔╝███████║█████╗ ██████╔╝█████╗
  10. ██╔══██╗██╔══██║██║ ███╔╝ ██║ ██║╚════██║██╔═══╝ ██╔══██║██╔══╝ ██╔══██╗██╔══╝
  11. ██║ ██║██║ ██║██║███████╗╚██████╔╝███████║██║ ██║ ██║███████╗██║ ██║███████╗
  12. ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝
  13. */
  14. Server.default.waitForBoot {
  15. // library path
  16. var libPath = PathName(thisProcess.nowExecutingPath.dirname +/+ "lib");
  17. "\n\n\n=============================================================".postln;
  18. "\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>".postln;
  19. "--- R H I Z O S P H E R E -----".postln;
  20. ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n".postln;
  21. // for each files in that lib folder
  22. libPath.filesDo({|afile|
  23. // tell me what you're executing:
  24. postln(" ." + afile.fileName);
  25. // execute it:
  26. this.executeFile(afile.fullPath);
  27. });
  28. });
  29. s.meter;
  30. s.plotTree;
  31. //free runaway synth:
  32. s.sendMsg(\n_free, 1553)
  33. //////////////////////////////////////////////////////////////////////////////////
  34. // P E R F O R M A N C E /////////////////////////////////////////////////////////
  35. //////////////////////////////////////////////////////////////////////////////////
  36. // BUFFERS and RECORDERS
  37. // buffers are stored during server's boot, across CTRL-dot.
  38. b = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
  39. c = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
  40. d = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
  41. e = Buffer.alloc(s, 44100 * 4.0, 1); // a four second 1 channel Buffer
  42. Synth(\recIn, [\bufnum, b]);
  43. b.normalize;
  44. Synth(\recIn, [\bufnum, c]);
  45. c.normalize;
  46. Synth(\recIn, [\bufnum, d]);
  47. d.normalize;
  48. Synth(\recIn, [\bufnum, e]);
  49. e.normalize;
  50. b.plot
  51. c.plot
  52. d.plot
  53. e.plot
  54. // ============================================================================
  55. // granulatorz.
  56. ~grainb = Synth(\bgrain, [\out, ~reverBus, \bufnum, b, \amp, 0.01]);
  57. ~grainb.set(\amp, 0.5, \amplag, 10)
  58. ~grainb.set(\rate, 2)
  59. ~grainb.set(\out, ~octoBus1)
  60. ~grainb.release(3)
  61. ~grainc = Synth(\bgrain, [\out, ~reverBus, \bufnum, c, \amp, 0.01]);
  62. ~grainc.set(\amp, 0.02, \amplag, 10)
  63. ~grainc.set(\rate, 2)
  64. ~grainc.release(10)
  65. ~graind = Synth(\bgrain, [\out, ~reverBus, \bufnum, d, \amp, 0.01]);
  66. ~graind.set(\amp, 0.5, \amplag, 10)
  67. ~graind.release(10)
  68. ~graine = Synth(\bgrain, [\out, ~reverBus, \bufnum, e, \amp, 0.01]);
  69. ~graine.set(\amp, 0.1, \amplag, 10)
  70. ~graine.release(10)
  71. // noise Cracle
  72. ~noiseCr1 = Synth(\noiseCrackle, [\out, ~octoBus1, \fadeTime, 30, \lpfa, 1, \hpfa, 0 ]);
  73. ~noiseCr1.set(\rq, 0.98);
  74. ~noiseCr1.set(\lpfa, 1);
  75. ~noiseCr1.set(\hpfa, 1);
  76. ~noiseCr1.set(\gate, 0, \fadeTime, 10);
  77. ~noiseCr1.release(1)
  78. ~noiseCr1.free;
  79. ~noiseCr2 = Synth(\noiseCrackle, [\out, ~octoBus2, \fadeTime, 30, \lpfa, 1, \hpfa, 0 ]);
  80. ~noiseCr2.set(\gate, 0, \fadeTime, 20);
  81. ~noiseCr2.free;
  82. ~noiseCr3 = Synth(\noiseCrackle, [\out, ~octoBus3, \fadeTime, 30, \lpfa, 0, \hpfa, 1 ]);
  83. ~noiseCr3.set(\gate, 0, \fadeTime, 1);
  84. ~noiseCr3.free;
  85. ~noiseCr4 = Synth(\noiseCrackle, [\out, ~octoBus4, \fadeTime, 30, \lpfa, 0, \hpfa, 1 ]);
  86. ~noiseCr4.set(\gate, 0, \fadeTime, 1);
  87. ~noiseCr4.free;
  88. ( // free them all at once
  89. ~noiseCr1.free;
  90. ~noiseCr2.free;
  91. ~noiseCr3.free;
  92. ~noiseCr4.free;
  93. )
  94. ~henonS1 = Synth(\henonSynth1, [\out, ~octoBus3, \amp, 0.4, \fadeTime, 4]);
  95. ~henonS1.set(\amp, 1);
  96. ~henonS1.set(\hpff, 200);
  97. ~henonS1.set(\lpff, 200);
  98. ~henonS1.release(10);
  99. ~henonS1.free;
  100. ~henonS2 = Synth(\henonSynth1, [\out, ~octoBus4, \amp, 0.4, \fadeTime, 4]);
  101. ~henonS2.set(\amp, 1);
  102. ~henonS2.set(\out, ~octoBus4);
  103. ~henonS2.set(\gate, 0, \fadeTime, 10);
  104. ~henonS2.free;
  105. ~darkHenon1 = Synth(\henonLsynth2, [\out, ~octoBus1, \fadeTime, 10]);
  106. ~darkHenon1.set(\gate, 0, \fadeTime, 10);
  107. ~darkHenon1.set(\amp, 0.1);
  108. ~darkHenon1.release(10);
  109. ~darkHenon1.free;
  110. ~darkHenon2 = Synth(\henonLsynth2, [\out, ~octoBus2, \fadeTime, 10]);
  111. ~darkHenon2.set(\amp, 1);
  112. ~darkHenon2.set(\gate, 0, \fadeTime, 3);
  113. ~darkHenon2.release(30);
  114. ~darkHenon2.free;
  115. // SOIL
  116. ~soil1 = Synth(\granSoil, [\out, ~octoBus1, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
  117. ~soil1durBus = Bus.control(s,1);
  118. ~soil1durBus.value = 0.001;
  119. ~soil1.map(\dur, ~soil1durBus);
  120. ~soil1DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil1durBus, SinOsc.kr(0.012,1.5pi).range(0.0001, 0.05))} ).play;
  121. ~soil1DurOsc.free;
  122. ~soil1.set(\amp, 0.5);
  123. ~soil1.set(\gate, 0, \fadeTime, 15); // use envelope to fade out
  124. ~soil1.release(15);
  125. ~soil1.free;
  126. //
  127. ~soil2 = Synth(\granSoil, [\out, ~octoBus2, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
  128. ~soil2durBus = Bus.control(s,1);
  129. ~soil2durBus.value = 0.0001;
  130. ~soil2.map(\dur, ~soil2durBus);
  131. ~soil2DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil2durBus, SinOsc.kr(0.029,1.5pi).range(0.0001, 0.08))} ).play;
  132. ~soil2DurOsc.free;
  133. ~soil2.release(15);
  134. //
  135. ~soil3 = Synth(\granSoil, [\out, ~octoBus3, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
  136. ~soil3durBus = Bus.control(s,1);
  137. ~soil3durBus.value = 0.0001;
  138. ~soil3.map(\dur, ~soil3durBus);
  139. ~soil3DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil3durBus, SinOsc.kr(0.029,1.5pi).range(0.0001, 0.08))} ).play;
  140. ~soil3DurOsc.free;
  141. ~soil3.release(15);
  142. //
  143. ~soil4 = Synth(\granSoil, [\out, ~octoBus4, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
  144. ~soil4durBus = Bus.control(s,1);
  145. ~soil4durBus.value = 0.01;
  146. ~soil4.map(\dur, ~soil4durBus);
  147. ~soil4DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil4durBus, SinOsc.kr(0.029,1.5pi).range(0.0001, 0.08))} ).play;
  148. ~soil4DurOsc.free;
  149. ~soil4.release(15);
  150. // MARKOV NOISES +
  151. ~latooWan1 = Synth(\latooWanderings, [\out, ~octoBus4, \fadeTime, 30, \amp, 0.3]);
  152. ~latooWan1.release(3);
  153. ~markov1 = Synth(\markovS1, [ \out, ~octoBus1, \freq, 440, \tsize, 3, \amp, 0.3, \clip, 0.69, \fadeTime, 0.01 ]);
  154. ~markov1.release(0.01);
  155. ~distbleeps = Synth(\latooTriggers, [\out, ~octoBus3, \trigA, 1.1, \fadeTime, 0.01, \amp, 0.9]);
  156. ~distbleeps.release(10);
  157. ~markov7 = Synth(\markovS1, [ \out, ~octoBus2, \freq, 740, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 7 ]);
  158. ~markov7.release(0.01)
  159. ~markov9 = Synth(\markovS1, [ \out, ~octoBus1, \freq, 1940, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 0.01 ]);
  160. ~markov9.release(0.01)
  161. (
  162. ~markov10 = Synth(\markovS1, [ \out, ~octoBus4, \freq, 501, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 0.01 ]);
  163. ~markov11 = Synth(\markovS1, [ \out, ~octoBus3, \freq, 1101, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 0.01 ]);
  164. ~markov12 = Synth(\markovS1, [ \out, ~octoBus2, \freq, 3001, \tsize, 3, \amp, 0.2, \clip, 0.9, \fadeTime, 0.01 ]);
  165. )
  166. (
  167. var rel=0.1;
  168. ~markov10.release(rel);
  169. ~markov11.release(rel);
  170. ~markov12.release(rel);
  171. )
  172. // TRIG RINGS
  173. ~lorenzTrig1 = Synth(\lorenzTrigRing, [\out, ~octoBus1, \freq, 1400, \amp, 0.5, \fadeTime, 0]);
  174. ~lorenzTrig1.set(\amp, 1); // use set fadeTime - set \gate = 0?
  175. ~lorenzTrig1.release; // use set fadeTime - set \gate = 0?
  176. ~lorenzTrig1.release(30); // use set fadeTime - set \gate = 0?
  177. ~lorenzTrig1.set(\fadeTime, 10, \gate, 0);
  178. ~lorenzTrig1.free
  179. ~stdTrig1 = Synth(\stndTrigRing, [\out, ~octoBus2, \freq,1900, \amp,0.5,\fadeTime, 10]);
  180. ~stdTrig1.release(30);
  181. ~stdTrig1.free
  182. ~lorenzTrig2 = Synth(\lorenzTrigRing, [\out, ~octoBus3, \freq, 400, \amp, 0.3, \fadeTime, 10, \min, 5, \max, 20]);
  183. ~lorenzTrig2.release(30);
  184. ~stdTrig2 = Synth(\stndTrigRing, [\freq, 70, \min, 0, \max, 2, \decay, 2, \ffreq, 200, \amp, 0.4, \out, ~octoBus4, \fadeTime, 20]) ;
  185. ~stdTrig2.release(30);
  186. ~henoTrig1 = Synth(\henoTrigRing, [\out, ~octoBus2, \freq, 2700, \amp, 1, \min, 0.1, \max, 1, \fadeTime, 20]);
  187. ~henoTrig1.release(30);
  188. // 139Hz
  189. ~gbmanTrig1 = Synth(\gbmanTrigRing, [\out, ~octoBus1, \freq, 139, \decay, 2, \min, 0.2, \max, 1, \amp, 0.4, \fadeTime, 2]);
  190. ~gbmanTrig1.release(30);
  191. // 3300Hz
  192. ~latooTrig1 = Synth(\latooTrigRing, [\out, ~octoBus4, \freq, 3300, \decay, 3, \min, 0.2, \max, 1, \amp, 0.2, \fadeTime, 10 ]);
  193. ~latooTrig1.release(30);
  194. // 4300Hz
  195. ~latooTrig2 = Synth(\latooTrigRing, [\out, ~octoBus3, \freq, 4300, \decay, 0.2, \min, 1, \max, 10, \amp, 0.2, \fadeTime, 10 ]);
  196. ~latooTrig2.set(\out, ~octoBus4)
  197. ~latooTrig2.release(30)
  198. // 210Hz
  199. ~fhnTrig1 = Synth(\fhnTrigRing, [\out, ~octoBus2, \freq, 210, \amp, 0.5, \decay, 2, \min, 0.2, \max, 1, \amp, 0.4, \fadeTime, 10]);
  200. ~fhnTrig1.release(30);
  201. // 200Hz
  202. ~fhnTrig3 = Synth(\fhnTrigRing, [\out, ~octoBus2, \freq, 200, \amp, 0.5, \decay, 2, \min, 0.2, \max, 1, \amp, 0.4, \fadeTime, 10]);
  203. ~fhnTrig3.release(30);
  204. // 2110
  205. ~fhnTrig2 = Synth(\fhnTrigRing, [\out, ~octoBus1, \freq, 2110, \amp, 0.5, \min, 2, \max, 20, \amp, 0.5, \fadeTime, 10]);
  206. ~fhnTrig2.set(\ffreq, 8000, \ffreqlag, 20)
  207. ~fhnTrig2.release(60)
  208. ~fhnTrig2 = Node.basicNew(nodeID:1369)
  209. ~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;
  210. // this one will fade out by itself at some point
  211. // back to SOIL - outro + henonS1?
  212. ~soil1 = Synth(\granSoil, [\out, ~octoBus1, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
  213. ~soil1durBus = Bus.control(s,1);
  214. ~soil1durBus.value = 0.001;
  215. ~soil1.map(\dur, ~soil1durBus);
  216. ~soil1DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil1durBus, SinOsc.kr(0.012,1.5pi).range(0.0001, 0.05))} ).play;
  217. ~soil1DurOsc.free;
  218. ~soil1.set(\amp, 0.1)
  219. ~soil1.set(\gate, 0, \fadeTime, 15); // use envelope to fade out
  220. ~soil1.release(30);
  221. ~soil1.free;
  222. //
  223. ~soil2 = Synth(\granSoil, [\out, ~octoBus2, \sndbuf, ~forestSoilBuf, \dur, 0.0001 ,\fadeTime, 20, \amp, 0.8]);
  224. ~soil2durBus = Bus.control(s,1);
  225. ~soil2durBus.value = 0.0001;
  226. ~soil2.map(\dur, ~soil2durBus);
  227. ~soil2DurOsc = SynthDef( \soilDurOsc, {Out.kr(~soil2durBus, SinOsc.kr(0.029,1.5pi).range(0.0001, 0.08))} ).play;
  228. ~soil2DurOsc.free;
  229. ~soil2.release(15);
  230. //
  231. ~henonS1 = Synth(\henonSynth1, [\out, ~octoBus3, \amp, 0.4, \fadeTime, 4]);
  232. ~henonS1.set(\amp, 0.90);
  233. ~henonS1.set(\hpff, 1000);
  234. ~henonS1.set(\lpff, 50);
  235. ~henonS1.release(10);
  236. ~henonS1.free;
  237. //
  238. ~henonS2 = Synth(\henonSynth1, [\out, ~octoBus3, \amp, 0.4, \fadeTime, 4]);
  239. ~henonS2.set(\amp, 0.05);
  240. ~henonS2.set(\hpff, 200);
  241. ~henonS2.set(\lpff, 200);
  242. ~henonS2.release(40)
  243. ~henonS2.free;
  244. // helper for nodes without object
  245. ~lorenzTrig1 = Node.basicNew(s, 1354)
  246. s.sendMsg(\n_free, 1590)
  247. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  248. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  249. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  250. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  251. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  252. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  253. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -