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.

1251 lines
34 KiB

  1. (
  2. /*
  3. __ ___ _ __ ___ __ _ ___ ___ ___ _ _ __
  4. / /\ | |_) | |_/ / / | | \ __ / /\ | |\/| / / \ | |_) | |_) | |_| | | / /`
  5. /_/--\ |_| \ |_| \ /_/ |_|_/ /_/) /_/--\ |_| | \_\_/ |_| \ |_| |_| | |_| \_\_,
  6. by Luka Prinčič. https://lukaprincic.si
  7. LICENCE? Oh whatever, just take what you need from it, learn,
  8. create, publish. A lot of what's in here has been taken and
  9. learned from others and reworked in one way or another.
  10. For the sake of ___, it's
  11. copyright Luka Prinčič,
  12. released under GNU GPL licence and/or Peer Production Licence
  13. To run this album, you need SuperCollider (3.11 at the time of
  14. writing) and SC3-plugins:
  15. https://supercollider.github.io/
  16. https://supercollider.github.io/sc3-plugins/
  17. Once installed, open this file (it needs to have .scd extension
  18. not .txt) in SCIDE - SuperCollider code editor (development
  19. environment) and choose 'Evaluate file' from 'Language' menu.
  20. Thank you for listening!
  21. Recording of this album is available via Kamizdat record label
  22. under conditions of Creative Commons BY-SA licence.
  23. */
  24. // -----------------------------------------------------------------------------------
  25. // before boot, raise memory?
  26. #[\internal, \local].do { |s|
  27. s = Server.perform(s);
  28. s.options.memSize = 2097152; // 2 gigs
  29. };
  30. Server.default.waitForBoot {
  31. fork {
  32. ">>> THIS IS THE START, MY FRIEND".postln;
  33. 0.1.wait;
  34. // prep buses and FX
  35. "--- prepping bussess ...".postln;
  36. ~mainOut.free;
  37. ~mainOut = Bus.audio(s,2);
  38. ~reverBus.free;
  39. ~reverBus = Bus.audio(s, 2);
  40. ~wranglerBus.free;
  41. ~wranglerBus = Bus.audio(s,2);
  42. 0.1.wait;
  43. // FX synthdefs
  44. "--- loading synthdefs for FX...".postln;
  45. SynthDef(\GreyholeVerb, {
  46. arg inBus, outBus, revWet=1, feedback = 0.5, lag = 10, dtime = 3, size = 4, diff = 8 ;
  47. var snd = In.ar(inBus, 2);
  48. var reverb = Greyhole.ar(snd, dtime, size: size, diff: diff, feedback: feedback);
  49. revWet = Lag.kr(revWet, lag);
  50. snd = snd + (reverb * revWet) * 0.5;
  51. Out.ar(outBus, snd);
  52. }).add;
  53. SynthDef(\dlywrangler, {
  54. arg out=0, in, wet=0.1, wet2=0.4;
  55. var snd, dly2;
  56. snd = In.ar(in,2);
  57. dly2 = CombN.ar(HPF.ar(snd,300),
  58. 1,
  59. [3/8,5/8] * LFNoise1.kr(0.4).range(0.98,1.02),
  60. 6,
  61. mul: LFNoise1.kr(0.1).range(0.4,0.1) * 2 * wet2);
  62. snd = CombN.ar(snd,
  63. 1,
  64. Lag.ar(LFNoise0.ar(1).range(0.01,0.1),0.1),
  65. 3,
  66. mul:wet) + snd;
  67. snd = Limiter.ar(snd, 0.8);
  68. snd = snd + dly2;
  69. Out.ar(out, snd);
  70. }).add;
  71. SynthDef(\mainOutFx, {
  72. arg inBus, amp=1, lag=0.5, thresh=0.8, outBus;
  73. var input, snd;
  74. input = In.ar(inBus, 2);
  75. snd = Limiter.ar(input, thresh);
  76. amp = VarLag.kr(amp+0.000001, lag, 0, \cub) - 0.000001;
  77. snd = snd * amp;
  78. snd = snd.softclip;
  79. Out.ar(outBus, snd);
  80. }).add;
  81. 0.1.wait;
  82. // effects
  83. "--- running effects ...".postln;
  84. //~greyholeVerb.free;
  85. ~greyholeVerb = Synth(\GreyholeVerb, [\inBus, ~reverBus, \outBus, ~mainOut,
  86. \revWet, 1], addAction:\addToTail);
  87. //~dlywrang1.free;
  88. ~dlywrang1 = Synth("dlywrangler",
  89. [\out, ~mainOut, \in, ~wranglerBus], addAction:\addToTail);
  90. //~mainOutFx.free;
  91. ~mainOutFx = Synth(\mainOutFx,
  92. [\inBus, ~mainOut, \outBus, 0], addAction:\addToTail);
  93. // ---------------------------------------------------------------------------------
  94. "*** setup done. onto the timeline! ...".postln;
  95. 1.wait;
  96. //~greyholeVerb.set(\revWet, 0.4);
  97. ~greyholeVerb.set(*[revWet:0.2, feedback:0.7, lag:10, dtime:0.1, size:5, diff:0.707 ]);
  98. // darksaw
  99. "--- dark saw synthdef...".postln;
  100. SynthDef(\softSaw, {
  101. arg out = 0, freq = 40, oscdetune = 0.1, amp = 1, pan = 0,
  102. gate = 1, attackTime = 0.1, susLevel = 1.0, releaseTime = 1.0, gainBus;
  103. var env, snd;
  104. oscdetune = oscdetune * 0.1;
  105. amp = amp * 0.4;
  106. env = Linen.kr(gate, attackTime, susLevel, releaseTime, doneAction:2);
  107. snd = VarSaw.ar(
  108. freq: [freq, freq * (1.003 + oscdetune)],
  109. width: SinOsc.kr(0.01,0.2).range(0.05,0.095));
  110. snd = snd + VarSaw.ar(
  111. freq: [(freq*2 * (1.001 - oscdetune)),(freq*2 * (1 + oscdetune))],
  112. width: SinOsc.kr(0.06,0.8).range(0.2,0.8));
  113. snd = Balance2.ar(snd.at(0), snd.at(1), pos: pan);
  114. snd = snd * amp * env * In.kr(gainBus,1);
  115. OffsetOut.ar(out, snd);
  116. }).add;
  117. ~softSawAmpBus.free;
  118. ~softSawAmpBus = Bus.control(s,1);
  119. ~softSawAmpBus.set(1);
  120. ~softSawAmpBusLiner = SynthDef(\linexamp0, { |outBus, lag, val|
  121. Out.kr(outBus, VarLag.kr(val+0.0001, lag, 0, \cub) - 0.0001)
  122. }).play(s, [outBus: ~softSawAmpBus, lag: 10, val:0]);
  123. wait(0.5);
  124. "--- be back lighter...".postln;
  125. // -----------------------------------------------
  126. // be back lighter
  127. // synthdef
  128. SynthDef(\param, { arg freq = 100, sustain, amp, out=0;
  129. var sig;
  130. sig = LFPar.ar(freq: [freq, freq*2.02]);
  131. sig = sig * [1,0.2];
  132. sig = (sig * 4).softclip * 0.8;
  133. //sig = LPF.ar(HPF.ar(sig, 150), 3000);
  134. sig = LPF.ar(sig, (freq * 3).min(20000));
  135. sig = sig * EnvGen.kr(Env.perc(0, sustain, 0.5), doneAction:2) * amp;
  136. sig = Splay.ar(sig, Rand(0,0.5), 1, Rand(-0.5,0.5));
  137. Out.ar(out, sig);
  138. }).add;
  139. 0.2.wait;
  140. //set main out gain to 0
  141. ~mainOutFx.set(\lag, 0, \amp, 0);
  142. 0.2.wait;
  143. // start playing starting pattern
  144. Pbindef(\prand,
  145. \instrument, \param,
  146. \midinote, Prout({
  147. var tone0, tone1, tone2, interval, freq0, delta;
  148. loop {
  149. tone0 = 0; //rrand(0,11);
  150. interval = 2;
  151. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12].choose + 0.1;
  152. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12].choose;
  153. freq0 = [tone1,tone2] + 52;
  154. freq0.yield;
  155. }
  156. }),
  157. \dur, Prand([1,2,4,8,12,16,4,6,8], inf) / 20,
  158. \amp, 1.2,
  159. \sustain, 0.2,
  160. \out, ~reverBus
  161. ).play; " . 1.0".postln;
  162. // fade in:
  163. ~mainOutFx.set(\lag, 10, \amp, 1);
  164. 30.wait;
  165. ~greyholeVerb.set(*[revWet:0.4, feedback:0.7, lag:10, dtime:0.1, size:5, diff:0.707 ]);
  166. Pbindef(\prand,
  167. \midinote, Prout({
  168. var tone0, tone1, tone2, interval, freq0, delta;
  169. loop {
  170. tone0 = 0; //rrand(0,11);
  171. interval = rrand(2,4);
  172. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12].choose + 0.1;
  173. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12].choose;
  174. freq0 = [tone1,tone2] + 52;
  175. freq0.yield;
  176. }
  177. }), // - Pstutter(4, Prand([0,1] * 12,inf)),
  178. \sustain, Prand((2..4)/10,inf),
  179. ); " . 1.1 - interval rrand 2-4".postln;
  180. 30.wait;
  181. // --
  182. Pbindef(\prand,
  183. \midinote, Prout({
  184. var tone0, tone1, tone2, interval, freq0, delta;
  185. loop {
  186. tone0 = [0,2,4,6].choose; //rrand(0,11);
  187. interval = rrand(2,4);
  188. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12,24].choose + 0.1;
  189. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12,24].choose;
  190. freq0 = [tone1,tone2] + 52;
  191. freq0.yield;
  192. }
  193. }) - Pstutter(4, Prand([0,1] * 12,inf)),
  194. \sustain, Prand((4..6)/10,inf),
  195. ); " . 1.2 [0,2,4,6].choose".postln;
  196. 1.wait;
  197. "--- softdarksaw pattern...".postln;
  198. Pbindef(\sawp0,
  199. \instrument, \softSaw,
  200. \dur, 10,
  201. \attackTime, 5,
  202. \releaseTime,5,
  203. \legato,1,
  204. \degree, Pseq([ [-2,3,11,20], [-2,5,7,21] ],inf),
  205. \octave, 3,
  206. \amp, [1,0.5,0.2,0.1] * 0.7,
  207. \out, ~reverBus,
  208. \gainBus, ~softSawAmpBus
  209. ).play;
  210. wait(1);
  211. ~softSawAmpBusLiner.set(\lag, 0, \val, 0);
  212. wait(0.5);
  213. ~softSawAmpBusLiner.set(\lag, 20, \val, 1);
  214. wait(0.5);
  215. // --
  216. 30.wait;
  217. Pbindef(\prand,
  218. \midinote, Prout({
  219. var tone0, tone1, tone2, interval, freq0, delta;
  220. loop {
  221. tone0 = rrand(0,11);
  222. interval = rrand(2,4);
  223. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12,24].choose + 0.1;
  224. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12,24].choose;
  225. freq0 = [tone1,tone2] + 52;
  226. freq0.yield;
  227. }
  228. }) - Pstutter(4, Prand([0,1] * 12,inf)),
  229. \sustain, Prand((9..10)/10,inf),
  230. ); " . 1.3 rrand(0,11), sustain".postln;
  231. 30.wait;
  232. Pbindef(\prand,
  233. \midinote, Prout({
  234. var tone0, tone1, tone2, interval, freq0, delta;
  235. loop {
  236. tone0 = 0; //rrand(0,2);
  237. interval = rrand(2,4);
  238. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12,24].choose + 0.1;
  239. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12,24].choose;
  240. freq0 = [tone1,tone2] + 52;
  241. freq0.yield;
  242. }
  243. }) - Pstutter(4, Prand([0,1] * 12,inf)),
  244. \sustain, Prand((3..6)/10,inf),
  245. ); " . 1.4 back to 0".postln;
  246. ~greyholeVerb.set(*[revWet:0.7, feedback:0.7, lag:10, dtime:0.1, size:5, diff:0.707 ]);
  247. ~softSawAmpBusLiner.set(\lag, 20, \val, 0.7);
  248. 30.wait;
  249. Pbindef(\prand,
  250. \midinote, Prout({
  251. var tone0, tone1, tone2, interval, freq0, delta;
  252. loop {
  253. tone0 = 0; //rrand(0,2);
  254. interval = 4; //rrand(2,4);
  255. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12,24].choose + 0.1;
  256. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12].choose;
  257. freq0 = [tone1,tone2] + 52;
  258. freq0.yield;
  259. }
  260. }), // - Pstutter(4, Prand([0,1] * 12,inf)),
  261. \sustain, Prand((5..9)/10,inf),
  262. ); " . 1.5 interval 4".postln;
  263. ~greyholeVerb.set(*[revWet:0.5, feedback:0.7, lag:10, dtime:0.1, size:5, diff:0.707 ]);
  264. ~softSawAmpBusLiner.set(\lag, 20, \val, 1.5);
  265. 21.wait;
  266. Pbindef(\prand,
  267. \midinote, Prout({
  268. var tone0, tone1, tone2, interval, freq0, delta;
  269. loop {
  270. tone0 = rrand(0,11);
  271. interval = rrand(2,4);
  272. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12,24].choose + 0.1;
  273. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12,24].choose;
  274. freq0 = [tone1,tone2] + 52;
  275. freq0.yield;
  276. }
  277. }) - Pstutter(4, Prand([0,1] * 12,inf)),
  278. \sustain, Prand((9..10)/10,inf),
  279. ); " . 1.6 rrand0-11".postln;
  280. 30.wait;
  281. ~greyholeVerb.set(*[revWet:0.3, feedback:0.7, lag:10, dtime:0.1, size:5, diff:0.707 ]);
  282. Pbindef(\prand,
  283. \midinote, Prout({
  284. var tone0, tone1, tone2, interval, freq0, delta;
  285. loop {
  286. tone0 = 0; //rrand(0,11);
  287. interval = 2;
  288. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12].choose + 0.1;
  289. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12, 24].choose;
  290. freq0 = [tone1,tone2] + 52;
  291. freq0.yield;
  292. }
  293. }),
  294. \sustain, Prand((4..9)/10,inf),
  295. ).play; " . 1.7 tone0:0".postln;
  296. ~softSawAmpBusLiner.set(\lag, 20, \val, 0.5);
  297. 10.wait;
  298. ~greyholeVerb.set(*[revWet:0.6, feedback:0.7, lag:10, dtime:0.1, size:5, diff:0.707 ]);
  299. Pbindef(\prand,
  300. \midinote, Prout({
  301. var tone0, tone1, tone2, interval, freq0, delta;
  302. loop {
  303. tone0 = 0; //rrand(0,11);
  304. interval = 2;
  305. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12, 24].choose + 0.1;
  306. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12].choose;
  307. freq0 = [tone1,tone2] + 52;
  308. freq0.yield;
  309. }
  310. }),
  311. \sustain, Prand((4..9)/10,inf),
  312. ).play; " . 1.8 24".postln;
  313. 10.wait;
  314. Pbindef(\prand,
  315. \midinote, Prout({
  316. var tone0, tone1, tone2, interval, freq0, delta;
  317. loop {
  318. tone0 = 0; //rrand(0,11);
  319. interval = 2;
  320. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12, 24].choose + 0.1;
  321. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12, 24].choose;
  322. freq0 = [tone1,tone2] + 52;
  323. freq0.yield;
  324. }
  325. }),
  326. \sustain, Prand((4..9)/10,inf),
  327. ).play; " . 1.9 24 & 24".postln;
  328. 10.wait;
  329. Pbindef(\prand,
  330. \midinote, Prout({
  331. var tone0, tone1, tone2, interval, freq0, delta;
  332. loop {
  333. tone0 = rrand(0,11);
  334. interval = rrand(2,4);
  335. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12,24].choose + 0.1;
  336. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12,24].choose;
  337. freq0 = [tone1,tone2] + 52;
  338. freq0.yield;
  339. }
  340. }) - Pstutter(4, Prand([0,1] * 12,inf)),
  341. \sustain, Prand((9..10)/10,inf),
  342. ); " . 1.10 rrand0-11".postln;
  343. ~softSawAmpBusLiner.set(\lag, 60, \val, 0);
  344. 30.wait;
  345. Pbindef(\sawp0).stop;
  346. ~greyholeVerb.set(*[revWet:0.8, feedback:0.7, lag:10, dtime:0.1, size:5, diff:0.707 ]);
  347. Pbindef(\prand,
  348. \midinote, Prout({
  349. var tone0, tone1, tone2, interval, freq0, delta;
  350. loop {
  351. tone0 = 0; //rrand(0,11);
  352. interval = 2;
  353. tone1 = Scale.minor(\pythagorean).at(tone0) + [0,12].choose + 0.1;
  354. tone2 = Scale.minor(\pythagorean).at(tone0 + interval) + [0,12].choose;
  355. freq0 = [tone1,tone2] + 52;
  356. freq0.yield;
  357. }
  358. }),
  359. \sustain, Prand((2..5)/10,inf),
  360. ).play; " . 1.11 tone0".postln;
  361. 10.wait;
  362. // sure one could use Pseg here:
  363. Pbindef(\prand, \amp, -1.dbamp); 2.wait;
  364. Pbindef(\prand, \amp, -2.dbamp); 2.wait;
  365. Pbindef(\prand, \amp, -3.dbamp); 2.wait;
  366. Pbindef(\prand, \amp, -4.dbamp); 2.wait;
  367. Pbindef(\prand, \amp, -5.dbamp); 2.wait;
  368. Pbindef(\prand, \amp, -6.dbamp); 2.wait;
  369. Pbindef(\prand, \amp, -7.dbamp); 2.wait;
  370. Pbindef(\prand, \amp, -8.dbamp); 2.wait;
  371. Pbindef(\prand, \amp, -9.dbamp); 10.wait;
  372. Pbindef(\prand).stop;
  373. // gcd mod ---------------------------------------------------------
  374. "--- gcdmod...".postln;
  375. SynthDef(\gcdmod, {
  376. arg outBus, amp=0.1, gate=1;
  377. var env;
  378. var a = TDuty.ar(Dseq((0..3), inf) + 5 * SampleDur.ir);
  379. var b = TDuty.ar(Dseq((3..0), inf) + 5.01 * SampleDur.ir);
  380. var mod = 50;
  381. var t = PulseCount.ar(a) % mod;
  382. var u = PulseCount.ar(b) % mod;
  383. var n, j, d, e, c;
  384. d = LocalIn.ar(2);
  385. n = gcd(t, u + [0, 1]);
  386. e = n.linexp(0, mod, 70, 10000);
  387. j = SinOsc.ar(e);
  388. LocalOut.ar(j * d);
  389. c = CombC.ar(j, 1, [0.009,0.007,0.008, 0.006] * LFNoise1.ar([0.01,0.01]).range(1.3,0.7), 30, mul:0.05);
  390. j = j * LFNoise1.ar(0.2).range(0,0.5) + Splay.ar(c);
  391. j = Greyhole.ar(j, damp:0.5, diff:0.5 size:4);
  392. j = Limiter.ar(LPF.ar(HPF.ar(j, 100), LFNoise1.kr(0.1).exprange(200,18000)), 0.7);
  393. j = j * LFPulse.ar([2.2,4.4]*2, 0.96, width:LFNoise1.ar(0.2).range(0.8,0.95)).range(LFNoise1.ar(0.1).range(0,1),1);
  394. j = j + LFPulse.ar([2.2,4.4], 0.96, mul: LFNoise1.kr(1/10).range(0,0.5) * Line.kr(0,1,30));
  395. j = LeakDC.ar(j);
  396. env = Linen.kr(gate, 0, 1, 0, 2);
  397. j = j * env * amp;
  398. Out.ar(outBus, j);
  399. }).add;
  400. SynthDef(\dNoz, {
  401. arg out=0, gate=1, amp=0.1, envattackTime=0.001, release=0.001;
  402. var snd, env;
  403. env = Linen.kr(gate, envattackTime, 1, release, doneAction:2);
  404. snd = WhiteNoise.ar(1);
  405. snd = snd + SinOsc.ar(SinOsc.kr(10).range(40,60), mul:0.2);
  406. snd = snd + Pulse.ar(SinOsc.kr(12).range(40,60), mul:0.1);
  407. snd = snd.clip2(0.8);
  408. snd = LPF.ar(snd, LFNoise2.ar(0.4).range(60,100), mul:3);
  409. snd = snd.dup;
  410. snd[1] = DelayL.ar(snd[1], 0.05, SinOsc.kr(0.2).range(0.001,0.003));
  411. snd = snd * env * amp;
  412. Out.ar(out, snd);
  413. }).add;
  414. 1.wait;
  415. Pbindef(\gcdmodp,
  416. \instrument, \gcdmod,
  417. \dur, Pseq([240]),
  418. \amp, 0.7,
  419. \legato, 1,
  420. \outBus, ~mainOut,
  421. ).play;
  422. 30.wait;
  423. Pbindef(\dBoz,
  424. \instrument, \dNoz,
  425. \dur, Pseq([Rest(5), 10],14),
  426. \amp, 0.4,
  427. \legato, 1,
  428. \out, ~mainOut,
  429. ).play; "--- dBoz dNoz...".postln;
  430. wait(190);
  431. "--- akj...".postln;
  432. // AKJ --------------------------------------------------------
  433. SynthDef(\akjDisChord, {
  434. arg freq=300, amp=0.1, out=0, gate=1;
  435. var snd, env;
  436. freq = [freq,freq*1.01];
  437. snd = LFPar.ar(freq) * 0.3
  438. + (LFTri.ar(freq*16/19, mul:0.3))
  439. + (Pulse.ar(freq*21/40, mul:0.1))
  440. + (SinOsc.ar(freq/8.01, mul:4).clip2(0.3));
  441. env = EnvGen.kr(Env([0,1,0],[20,30], \cub, 1), gate, doneAction:2);
  442. snd = Splay.ar(snd);
  443. snd = snd * env * amp;
  444. Out.ar(out, snd);
  445. }).add;
  446. SynthDef(\akjBaz, {
  447. arg freq=300, amp=0.1, out=0, gate=1;
  448. var snd, env;
  449. snd = SinOsc.ar(freq/4, mul:0.7)!2;
  450. snd = snd * Lag.ar(LFPulse.ar(freq/8.02, 0.5).range(1,0),0.005);
  451. snd = snd.softclip(0.5) * 1.5 ;
  452. env = Linen.kr(gate, 0,1,0, 2);
  453. snd = snd * env * amp;
  454. Splay.ar(snd);
  455. Out.ar(out, snd);
  456. }).add;
  457. SynthDef(\akjClick, {
  458. arg out=0, gate=1, freq=440, amp=0.1, releaseTime=0.1;
  459. var snd, env;
  460. snd = LFPulse.ar([freq, freq * 2], width: LFNoise1.ar(0.1).exprange(0.001,0.004));
  461. snd = snd + (WhiteNoise.ar(1) * snd);
  462. snd = HPF.ar(snd, 200);
  463. env = EnvGen.ar(Env.perc(0,releaseTime));
  464. snd = snd * env * amp * Linen.kr(gate, 0, 1, releaseTime, 2);
  465. snd = Splay.ar(snd);
  466. Out.ar(out, snd);
  467. }).add;
  468. wait(0.2);
  469. Pbindef(\akjDisChordp, *[
  470. instrument: \akjDisChord,
  471. freq:300,
  472. dur: Pseq([260]),
  473. legato: 1.1,
  474. amp: 0.8,
  475. out: ~mainOut
  476. ]).play;
  477. wait(60);
  478. Pbindef(\akjClickp, *[
  479. instrument: \akjClick,
  480. dur: Pseq([
  481. Pn(1/8, 7), Rest(1/8), // 1
  482. Rest(1), // 1
  483. Pn(1/4, 3), Rest(3/8), Pn(1/8, 1),
  484. Pn(1/4, 3), Rest(3/8), Pn(1/8, 1),
  485. Pn(1/4, 3), Rest(4/8),
  486. Pn(1/8, 7), Rest(1/8),
  487. Prand([ Rest(1), Pn(1/6,6) ]),
  488. Pn(1/8, 3), Rest(1/8),
  489. Prand([ Rest(1.25), Pn(1/4, 5) ]),
  490. Prand([ Pn(1/8, 3), Pn(1/16, 6) ]), Rest(1/8),
  491. ],inf),
  492. amp: 9/20,
  493. releaseTime: 0.3,
  494. freq:1,
  495. out: ~mainOut
  496. ]).play;
  497. wait(60);
  498. Pbindef(\akjBazp, *[
  499. instrument: \akjBaz,
  500. freq: 300,
  501. dur: 10,
  502. amp: 0.3,
  503. legato: 0.20,
  504. out: ~mainOut
  505. ]).play;
  506. wait(120);
  507. Pbindef(\akjClickp).stop;
  508. Pbindef(\akjBazp).stop;
  509. wait(30);
  510. "--- shippo...".postln;
  511. // SHIPPO -----------------------------------------------------------
  512. SynthDef(\shippo, {
  513. arg amp=0.1, gate=1, out=0, freq=100;
  514. var snd, env, rev;
  515. freq = [freq/2, freq * 0.99, freq * 1.51];
  516. snd = Pulse.ar( freq * LFNoise1.ar(1/10).range(1,1.03), mul:0.4 )
  517. ; // Lag.ar(LFPulse.ar(1/5, iphase:0.98, width:0.1));
  518. snd = Splay.ar(snd,spread:0.6);
  519. snd = LPF.ar(snd, LFNoise1.ar(1/4).exprange(500,10000));
  520. env = EnvGen.kr(Env.adsr(0.001,0,1, 0.1, 1), gate, doneAction:0);
  521. snd = snd * env;
  522. snd = snd;
  523. rev = Array.fill (8, {
  524. CombL.ar(
  525. snd,
  526. 0.2,
  527. LFNoise1.ar(1/3).range(0.98,1.02) * rrand(0.01, 0.3),
  528. 7)
  529. });
  530. rev = Splay.ar(rev);
  531. rev = LeakDC.ar(rev);
  532. rev = HPF.ar(rev, 100);
  533. snd = snd + rev;
  534. snd = Limiter.ar(snd, 0.8);
  535. snd = snd * amp;
  536. DetectSilence.ar(snd, doneAction:2);
  537. Out.ar(out, snd);
  538. }).add;
  539. wait(0.1);
  540. Pbindef(\shippoP, *[
  541. instrument: \shippo,
  542. degree: 4,
  543. octave: 3,
  544. //dur: Pseq([3,5,10] / 8, inf),
  545. dur: Pseq([4,8,12] / 8, inf),
  546. legato:0.3,
  547. amp: 0.1,
  548. out: ~mainOut
  549. ]);
  550. Pbindef(\shippoP).quant(1);
  551. Pbindef(\shippoP).play;
  552. Pbindef(\akjDisChordp).stop;
  553. wait(10);
  554. Pbindef(\shippoP, \amp, 0.2); wait(3);
  555. Pbindef(\shippoP, \amp, 0.3); wait(3);
  556. Pbindef(\shippoP, \amp, 0.4); wait(3);
  557. Pbindef(\shippoP, \amp, 0.5); wait(3);
  558. Pbindef(\shippoP, \amp, 0.6); wait(20);
  559. // midline ---------------------------------------------------------
  560. "--- sawline ...".postln;
  561. SynthDef(\sawLine, {
  562. arg out=0, freq=440, gate=1, amp=1, alag=10;
  563. var snd, env, gen, numosc;
  564. numosc = 10;
  565. env = Env.adsr(20, 0, 1, 30, 1, \sin);
  566. gen = EnvGen.kr(env, gate, doneAction:2);
  567. //faderosc = SinOsc.ar(1/60).range(-1,2).min(1).max(0);
  568. snd = Array.fill(numosc, {
  569. var local, lfreq;
  570. lfreq = [freq, freq*2.01, freq/1.99 ];
  571. //lfreq = [freq, freq * 1.98, freq * 0.51];
  572. //lfreq = freq;
  573. local = Saw.ar(rrand(lfreq, lfreq * 1.02 ) * LFNoise1.kr(0.3).range(1, 1.01), -10.dbamp * [0.5, 0.3, 0.3]);
  574. local = Mix(local);
  575. });
  576. snd = Splay.ar(snd);
  577. snd = LPF.ar(snd, LFNoise1.ar(0.06).exprange(3000,10000));
  578. snd = CombL.ar(snd, 1, LFNoise1.ar(0.1).range([0.5,0.65],[0.53,0.68]), 15, -1.dbamp) + snd;
  579. snd = snd * gen;
  580. snd = snd * Lag.kr(amp, alag);
  581. Out.ar(out, snd);
  582. }).add;
  583. wait(0.5);
  584. Pbindef(\midlineP,
  585. \instrument, \sawLine,
  586. \dur, 8,
  587. \degree, 6,
  588. \octave, 7,
  589. \out, ~reverBus,
  590. \amp, 0.4,
  591. \ctranspose, 6-12,
  592. \scale, Scale.minor(\just),
  593. ).play;
  594. // --------------------------------------------------------------------
  595. wait(30);
  596. Pbindef(\midlineP, \degree, 1);
  597. wait(20);
  598. Pbindef(\midlineP, \degree, 4);
  599. wait(20);
  600. Pbindef(\midlineP, \degree, 6);
  601. wait(20);
  602. Pbindef(\midlineP, \degree, 4);
  603. wait(10);
  604. Pbindef(\midlineP, \octave, [5,7]);
  605. wait(20);
  606. Pbindef(\shippoP).stop;
  607. wait(5);
  608. // --- wrangle mel ------------------------------------------------------
  609. "--- wranglemel ...".postln;
  610. SynthDef(\sin1, {
  611. arg freq=440, out=0, gate=1, amp=0.1, release=0, cutoff=10, rq=0.5;
  612. var snd, env;
  613. freq = [freq,freq*1.01];
  614. env = Linen.kr(gate, attackTime: 0.001, releaseTime: release, doneAction:2);
  615. snd = SinOsc.ar(freq) + Saw.ar(freq*1.004, mul:0.3) + Pulse.ar(freq*0.996, mul:0.4);
  616. snd = snd + snd.fold2(0.65);
  617. snd = (snd * 0.5) + (snd.wrap2(0.64) * 0.5) * 2;
  618. cutoff = cutoff * 0.1;
  619. cutoff = freq.pow(cutoff);
  620. cutoff = cutoff.max(100);
  621. cutoff = cutoff.min(18000);
  622. snd = RLPF.ar(snd, cutoff, rq);
  623. snd = snd * env;
  624. snd = snd * amp;
  625. OffsetOut.ar(out, snd);
  626. }).add;
  627. wait(0.5);
  628. // basics
  629. Pbindef(\y3,
  630. \instrument, \sin1,
  631. \degree, Pseq( [ 0, 2, -1, 5, -2, 6 ], inf),
  632. \ctranspose, 6-12,
  633. \octave, 5,
  634. \scale, Scale.minor(\just),
  635. \mtranspose, 0,
  636. \cutoff, Pstutter(16, Pseq([Pseq((13..18)),Pseq((17..12))].min(11),inf)),
  637. \rq, Prand([0.2,0.3,0.5]*1,inf),
  638. \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.2, inf),
  639. \release, 0.1,
  640. \dur, 1/8,
  641. \amp, [0.2,0.2,0.1] * Pseq([Prand([1,0.7]), 0.8, 0.9], inf) * 0.4,
  642. \dlywet, Pstutter(8, Pfunc({~dlywrang1.set(\wet, rrand(0, ((0..1) * 0.1).choose ) ) })),
  643. \out, ~wranglerBus,
  644. );
  645. Pbindef(\y3).quant=1;
  646. Pbindef(\y3).play;
  647. wait(20);
  648. Pbindef(\midlineP, \degree, Pseq([6,1,4], inf), \dur, 40 );
  649. Pbindef(\midlineP, \amp, 0.1 );
  650. Pbindef(\y3, \cutoff, Pstutter(16, Pseq([Pseq((13..18)),Pseq((17..12))].min(13),inf)));
  651. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.3, inf));
  652. wait(15);
  653. Pbindef(\y3, \cutoff, Pstutter(16, Pseq([Pseq((13..18)),Pseq((17..12))].min(14),inf)));
  654. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.4, inf));
  655. wait(15);
  656. Pbindef(\y3, \cutoff, Pstutter(16, Pseq([Pseq((13..18)),Pseq((17..12))].min(15),inf)));
  657. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.5, inf));
  658. Pbindef(\y3, \octave, [4,5]);
  659. Pbindef(\y3, \degree, Pseq( [ [7,0], 2, -1, Prand([4,5]), Prand([-2,Pseq([2,6])]) ], inf));
  660. wait(30);
  661. Pbindef(\y3, \cutoff, Pstutter(16, Pseq([Pseq((13..18)),Pseq((17..12))].min(16),inf)));
  662. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.6, inf));
  663. Pbindef(\y3, \octave, [4,5,6]);
  664. Pbindef(\y3, \mtranspose, Pstutter(16, Pseq([Pn(0,4), 3,5],inf)));
  665. wait(30);
  666. Pbindef(\y3, \mtranspose, Pstutter(16, Pseq([7, Pn(0,3), 3, 5 ],inf)));
  667. // --- whitenoise hihat ----------------------------------------------------
  668. "--- wHat ...".postln;
  669. SynthDef(\wHat, {
  670. arg outBus=0, amp=0.1, freq=2000, rq=0.5, gate=1, release=0.002, pan=0;
  671. var snd, env;
  672. env = EnvGen.kr(Env.cutoff(release), gate, doneAction:2);
  673. snd = BPF.ar(WhiteNoise.ar, freq, rq, amp);
  674. snd = HPF.ar(snd, 1000);
  675. snd = snd * env;
  676. OffsetOut.ar(outBus, Pan2.ar(snd,pan));
  677. }).add;
  678. Pbindef(\wHatp,
  679. \instrument, \wHat,
  680. \dur, 1/8,
  681. \freq, Prand([1,2,3,4] * 300 + 2500, inf),
  682. \rq, Prand([0.8,0.7,0.6], inf),
  683. \pan, Prand((1..10) * 0.1 - 0.5,inf),
  684. \amp, Prand((1..10) * 0.02 + 0.3,inf),
  685. \outBus, ~mainOut, // wrangler?
  686. \legato, Pseq([Pn(0.05,7),Prand((1..10)/80+0.05,inf)],inf),
  687. );
  688. Pbindef(\wHatp).quant(1);
  689. wait(22/8);
  690. Pbindef(\wHatp).play;
  691. wait(30);
  692. Pbindef(\midlineP).stop;
  693. //wait(30);
  694. Pbindef(\wHatp, \legato, Pseq([ Pseq((1..24)/24,1), Pseq([Pn(0.05,7),Prand((1..10)/80+0.05,inf)],inf)]));
  695. wait(24/8);
  696. Pbindef(\y3, \cutoff, Pstutter(16, Pseq([Pseq((13..18)),Pseq((17..12))].min(17),inf)));
  697. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.7, inf));
  698. Pbindef(\y3, \octave, [4,5,6] + Pwrand([0,2,1, 3],[0.7,0.1,0.1,0.1],inf));
  699. wait(30);
  700. Pbindef(\y3, \cutoff, Pstutter(16, Pseq([Pseq((13..18)),Pseq((17..12))].min(18),inf)));
  701. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.8, inf));
  702. Pbindef(\y3, \octave, Pstutter(32, Pseq( [5, [4,5], [4,5,6] ], inf), inf) + Pwrand( [0,1,1,-1], [0.7,0.1,0.1,0.1], inf));
  703. Pbindef(\y3, \dlywet, Pstutter(8, Pfunc({~dlywrang1.set(\wet, rrand(0, ((0..4) * 0.1).choose ) ) })));
  704. wait(30);
  705. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.9, inf));
  706. Pbindef(\y3, \octave, Pstutter(32, Pseq( [5, [4,5], [4,5,6] ], inf), inf) + Pwrand( [0,1,2,-1], [0.7,0.1,0.1,0.1], inf));
  707. wait(30);
  708. Pbindef(\wHatp, \legato, Pseq([ Pseq((1..24)/24,1), Pseq([Pn(0.05,7),Prand((1..10)/80+0.05,inf)],inf)]));
  709. wait(20/8);
  710. Pbindef(\wHatp).stop;
  711. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.3, inf));
  712. Pbindef(\y3, \cutoff, Pstutter(16, Pseq([Pseq((13..18)),Pseq((17..12))].min(14),inf)));
  713. wait(20);
  714. Pbindef(\y3, \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.6, inf));
  715. Pbindef(\y3, \degree, Pseq( [ 0, 2, -1, 5, -2, 6 ], inf));
  716. Pbindef(\y3, \octave, [4,5]);
  717. //Pbindef(\y3, \octave, [4,5,6] + Pwrand([0,2,1, 3],[0.7,0.1,0.1,0.1],inf));
  718. Pbindef(\y3, \dlywet, Pstutter(8, Pfunc({~dlywrang1.set(\wet, rrand(0, ((3..9) * 0.1).choose ) ) })));
  719. wait(30);
  720. ~dlywrang1.set(\wet2, 1);
  721. wait(4);
  722. Pbindef(\y3).stop;
  723. wait(4);
  724. // --- lcmnoi ----------------------------------------------------------------------
  725. "--- lcmnoi ...".postln;
  726. SynthDef(\lcmnoise, {
  727. arg gate=1, outBus, amp1=0, amp2=1, amp=0.1;
  728. var snd, revchain, env;
  729. snd = [
  730. tanh(lcm(SinOsc.ar(
  731. LFNoise0.kr(LFNoise0.kr(1/10).exprange(0.1,1)).exprange(1,15000)
  732. ).range(-100,100).round(1),SinOsc.ar(
  733. LFNoise0.kr(LFNoise0.kr(1/10).exprange(0.1,1)).exprange(1,15000)
  734. ).range(-100,100).round(1))*0.0001),
  735. tanh(lcm(Saw.ar(
  736. LFNoise0.kr(LFNoise0.kr(1/10).exprange(0.1,1)).exprange(1,15000)
  737. ).range(-100,100).round(1),LFCub.ar(
  738. LFNoise0.kr(LFNoise0.kr(1/10).exprange(0.1,1)).exprange(1,15000)
  739. ).range(-100,100).round(1))*0.0001)
  740. ] ;
  741. snd = BHiPass.ar(snd, 180);
  742. snd = snd.softclip * 0.8;
  743. snd = Splay.ar(snd, spread:1);
  744. revchain = snd * EnvGen.ar(Env.perc(0, 0.1, Rand(10,10000), 4));
  745. revchain = Greyhole.ar(
  746. in: revchain,
  747. delayTime: LFNoise1.ar(1).range(0.0001,0.2),
  748. damp: 0.5,
  749. size: LFNoise1.ar(0.1).exprange(0.0001,5),
  750. feedback: 0.95);
  751. revchain = LeakDC.ar(revchain);
  752. revchain = Limiter.ar(revchain) * LFNoise1.ar([1,1]).range(0,0.9);
  753. snd = snd * LFNoise0.ar([0.9,0.8]).range(0,2);
  754. snd = (snd * amp1) + (revchain * amp2);
  755. snd = snd.softclip * 0.8;
  756. env = Linen.kr(gate, 0, 1, 0, 2);
  757. snd = snd * amp * env;
  758. Out.ar(outBus, snd);
  759. //snd = LPF.ar(snd.softclip, LFNoise1.ar(0.1).exprange(10000,20000)) * 0.8;
  760. }).add;
  761. wait(0.5);
  762. Pbindef(\lcmnoip,
  763. \instrument, \lcmnoise,
  764. \dur, Pseq([
  765. Pseq([
  766. Prand([Pseq([0.01,0.01]),0.02]),
  767. Pn(0.05,19),
  768. 9.03
  769. ], 20), // 20 x 10
  770. 30]),
  771. \amp, 1,
  772. \amp1, Pseq([1,0.1],inf),
  773. \amp2, Pseq([0.6,1],inf),
  774. \legato, 1,
  775. \out, ~mainOut,
  776. ).play;
  777. 160.wait;
  778. "--- s1distdron...".postln;
  779. // S1 DISTORTED DRONE -----------------------------------------------------
  780. SynthDef(\s1Dist, {
  781. arg freq=440, gate=1, out=0, amp=0.1, ampBus, d1 = 5, d2 = 1, d3=5, ffreq=200, ffreqBus;
  782. var snd = Saw.ar([freq, freq*1.01]);
  783. var env = Linen.kr(gate, releaseTime: 0.1, doneAction:2);
  784. snd = snd + SinOsc.ar([freq*0.99, freq]);
  785. snd = snd + Pulse.ar([freq*0.99, freq]);
  786. snd = snd.clip2(LFNoise1.ar(0.3).range(0.3,0.8)) * d1;
  787. snd = snd.wrap2(LFNoise1.ar(0.3).range(0.3,0.8)) * d2;
  788. snd = snd.fold2(LFNoise1.ar(0.3).range(0.3,0.8)) * d3;
  789. snd = LeakDC.ar(snd);
  790. ffreq = In.kr(ffreqBus, 1);
  791. ffreq = ffreq.max(20);
  792. snd = LPF.ar(snd, ffreq);
  793. snd = Limiter.ar(snd);
  794. snd = Splay.ar(snd);
  795. amp = In.kr(ampBus, 1);
  796. Out.ar(out, snd*env*amp);
  797. }).add;
  798. ~s1DistAmpBus.free;
  799. ~s1DistAmpBus = Bus.control(s,1);
  800. ~s1DistAmpBus.set(0);
  801. ~s1DistAmpLiner = SynthDef(\linexamp, { |outBus, lag, val|
  802. Out.kr(outBus, VarLag.kr(val+0.0001, lag, 0, \cub) - 0.0001 * 0.9)
  803. }).play(s, [outBus: ~s1DistAmpBus, lag: 10, val:0]);
  804. ~s1DistFfreqBus.free;
  805. ~s1DistFfreqBus = Bus.control(s,1);
  806. ~s1DistFfreqBus.set(100);
  807. ~s1DistFfreqLiner = SynthDef(\linexamp, { |outBus, lag, val|
  808. Out.kr(outBus, VarLag.kr(val+0.0001, lag, 0, \cub) - 0.0001)
  809. }).play(s, [outBus: ~s1DistFfreqBus, lag: 10, val:200]);
  810. wait(0.5);
  811. Pbindef(\s1DistP,
  812. \instrument, \s1Dist,
  813. \degree, -1,
  814. \dur, 2,
  815. \octave, [2,3],
  816. \d1, Prand((1..5),inf),
  817. \d2, Prand((1..5),inf),
  818. \d3, 5,
  819. \legato, 1,
  820. // needs wrangled delay!
  821. \out, ~wranglerBus,
  822. \dlywet, Pstutter(8, Pfunc({~dlywrang1.set(\wet, rrand(0, ((3..6) * 0.1).choose ) ) })),
  823. \ampBus, ~s1DistAmpBus,
  824. \ffreqBus, ~s1DistFfreqBus
  825. ).play;
  826. wait(1);
  827. ~s1DistAmpLiner.set(\lag, 40, \val, 0.4); wait(20);
  828. ~s1DistFfreqLiner.set(\lag, 40, \val, 500); wait(40);
  829. ~s1DistFfreqLiner.set(\lag, 10, \val, 1500); wait(30);
  830. ~s1DistFfreqLiner.set(\lag, 10, \val, 7500); wait(20);
  831. ~s1DistFfreqLiner.set(\lag, 1, \val, 700); wait(10);
  832. ~s1DistFfreqLiner.set(\lag, 5, \val, 2700); wait(10);
  833. ~s1DistFfreqLiner.set(\lag, 1, \val, 400); wait(10);
  834. ~s1DistFfreqLiner.set(\lag, 1, \val, 6400); wait(10);
  835. ~s1DistFfreqLiner.set(\lag, 1, \val, 15400); wait(5);
  836. ~s1DistFfreqLiner.set(\lag, 7, \val, 1000); wait(20);
  837. ~s1DistFfreqLiner.set(\lag, 7, \val, 3000); wait(10);
  838. ~s1DistFfreqLiner.set(\lag, 7, \val, 400); wait(20);
  839. ~s1DistFfreqLiner.set(\lag, 1, \val, 20000); wait(5);
  840. SynthDef(\dustnoise, {
  841. arg outBus=0, gate=1, amp=0.1, release=1, density=1;
  842. var snd, env;
  843. env = Linen.kr(gate, 0, 1, release, 2);
  844. snd = WhiteNoise.ar * LFPulse.ar(0.06, width:0.02) * -25.dbamp;
  845. snd = HPF.ar(snd, 2000);
  846. snd = snd + Dust.ar(LFNoise1.ar(0.1).range(1,100) * density, mul:0.2);
  847. snd = Pan2.ar(snd, LFNoise1.kr(0.1).range(-0.5,0.5));
  848. snd = snd * env * amp;
  849. OffsetOut.ar(outBus, snd);
  850. }).add;
  851. wait(0.5);
  852. Pbindef(\dustnoiseP,
  853. \instrument, \dustnoise,
  854. \amp, 1,
  855. \dur, 30,
  856. \legato, 1,
  857. \release, 0.1,
  858. \density, 10,
  859. ).play;
  860. ~s1DistFfreqLiner.set(\lag, 7, \val, 1000); wait(20);
  861. ~s1DistFfreqLiner.set(\lag, 20, \val, 300); wait(20);
  862. ~s1DistFfreqLiner.set(\lag, 5, \val, 3300); wait(5);
  863. ~s1DistFfreqLiner.set(\lag, 5, \val, 150); wait(5);
  864. Pbindef(\dustnoiseP, \density, 4);
  865. ~s1DistAmpLiner.set(\lag, 15, \val, 0.5); wait(15);
  866. "--- padme ...".postln;
  867. // padme -----------------------------------------------------------------------------------
  868. SynthDef(\padme, {
  869. arg out=0, gate=1, amp=1, alag=10, freq;
  870. var sum, snd0, env, gen, numosc;
  871. numosc = 10;
  872. env = Env.adsr(20, 0, 1, 30, 1, \cub);
  873. gen = EnvGen.kr(env, gate, doneAction:2);
  874. snd0 = Array.fill(numosc, {
  875. var lfreq, local;
  876. lfreq = [freq, freq * 1.5, freq * 3, freq * 4];
  877. local = Saw.ar(rrand(lfreq, lfreq * 1.03 ) * LFNoise1.kr(0.3).range(1, 1.03), -10.dbamp);
  878. local = Mix(local);
  879. });
  880. snd0 = Splay.ar(snd0);
  881. snd0 = LPF.ar(snd0, LFNoise1.ar(0.06).exprange(300,10000));
  882. snd0 = CombL.ar(snd0, 1, LFNoise1.ar(0.05).range([0.5,0.65],[0.53,0.68]), 15, -1.dbamp) + snd0;
  883. sum = snd0 * gen;
  884. sum = sum * Lag.kr(amp, alag);
  885. Out.ar(out, sum);
  886. }).add;
  887. wait(0.2);
  888. Pbindef(\padmeP,
  889. \instrument, \padme,
  890. \freq, Pseq([50, 80],inf),
  891. \dur, 30,
  892. \legato, 1.2,
  893. \amp, 0.9,
  894. \out, ~mainOut
  895. ).play;
  896. ~s1DistAmpLiner.set(\lag, 20, \val, 0); wait(15);
  897. Pbindef(\s1DistP).stop;
  898. ~s1DistAmpLiner.free;
  899. ~s1DistFfreqLiner.free;
  900. wait(30);
  901. wait(30);
  902. Pbindef(\dustnoiseP, \density, 1);
  903. wait(110);
  904. Pbindef(\padmeP, \freq, Pseq([80],inf));
  905. wait(20);
  906. Pbindef(\padmeP, \amp, 0.4);
  907. Pbindef(\dustnoiseP, \amp, Pseg(Pseq([1,0]), 90, \cub) ); // ???
  908. // -- Soft dark saw ---------------------------------------
  909. "--- soft dark saw...".postln;
  910. Pbindef(\sawp1,
  911. *[
  912. instrument: \softSaw,
  913. dur: 10,
  914. attackTime: 5,
  915. releaseTime:5,
  916. legato:1,
  917. degree: Pseq([ [-2,3,11,20], [-2,5,7,21] ],inf),
  918. octave: 3,
  919. amp: [1,0.5,0.2,0.1] * 0.7,
  920. out: ~reverBus,
  921. gainBus: ~softSawAmpBus
  922. ]
  923. ).play;
  924. wait(1);
  925. ~softSawAmpBusLiner.set(\lag, 0, \val, 0);
  926. wait(0.5);
  927. ~softSawAmpBusLiner.set(\lag, 20, \val, 1);
  928. wait(0.5);
  929. wait(30);
  930. Pbindef(\padmeP, \amp, 0.2);
  931. wait(60);
  932. Pbindef(\padmeP).stop;
  933. Pbindef(\dustnoiseP).stop;
  934. wait(30);
  935. Pbindef(\sawp1, \amp, [1,0.5,0.2,0.1] * 0.5);
  936. wait(15);
  937. ~greyholeVerb.set(*[revWet:0.5, feedback:0.8, lag:10, dtime:0.1, size:5, diff:0.707 ]);
  938. "--- lorenz patterns...".postln;
  939. // -- lorenz patterns ------------------------------------------
  940. SynthDef(\blipo, { | out, freq = 440, amp = 0.1, nharms = 10, pan = 0, gate = 1, sustain, attack=0.1 |
  941. var audio = Blip.ar(freq * (SinOsc.kr(3).range(1,1.01)), nharms, amp);
  942. var env = Linen.kr(gate, attackTime: attack, releaseTime: sustain, doneAction: Done.freeSelf);
  943. OffsetOut.ar(out, Pan2.ar(audio, pan, env) );
  944. }).add;
  945. wait(0.5);
  946. ~dotsP = Pbind(
  947. \dur, Pflatten(1, Plorenz() * 1),
  948. \attack, 0.01,
  949. \octave, 3,
  950. \amp, 0.4,
  951. \nharms, Prand((2..7),500) );
  952. ~linesP = Pbind(
  953. \dur, Pflatten(1, Plorenz() * 5),
  954. \attack, 3,
  955. \octave, Prand([2,3,4],inf),
  956. \nharms, Prand((1..4),80),
  957. \amp, 0.3 );
  958. ~highP = Pbind(
  959. \dur, Pflatten(1, Plorenz() * 5),
  960. \attack, 3,
  961. \octave, 5,
  962. \nharms, Prand((1..3),50),
  963. \amp, 0.03 );
  964. // just plays out!
  965. ~lorenzP = Pbindf(
  966. Ptpar([ 0, ~dotsP, 60, ~linesP, 160, ~highP]),
  967. \instrument, \blipo,
  968. \degree, (Pflatten(1, Plorenz()) * 18).asInteger,
  969. \mtranspose, Prand([Pn(0,24),Pn(2,24),Pn(4,24)], inf),
  970. \detune, Prand([0,1,0.5,1.5], inf),
  971. \scale, Scale.major(\pythagorean),
  972. \legato, Prand((4..7),inf) * 0.2,
  973. \pan, Prand((-10..10),inf) * 0.1,
  974. \out, ~reverBus
  975. ).play;
  976. wait(140);
  977. ~softSawAmpBusLiner.set(\lag, 120, \val, 0);
  978. wait(120);
  979. Pbindef(\sawp1).stop;
  980. while({ ~lorenzP.isPlaying }, { wait(1); });
  981. wait(10);
  982. // fade out
  983. ~mainOutFx.set(\lag, 10, \amp, 0);
  984. wait(5);
  985. //////////////////////////////////////////////////////////////////////////
  986. "<<< THIS IS THE END, MY FRIEND.\n---------------------------------\n\n".postln;
  987. s.freeAll;
  988. "";
  989. };
  990. };
  991. );