«Glitch Routine - Basis for 'Lost Among the Atoms' SuperCollider EP» by rumush

on 11 Nov'15 13:45 in

Routine that randomly changes parameters of the glitch function. It is a basis for one of the tracks for 'Lost Among the Atoms' Noise/Glitch EP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Rumush
// Facebook: https://www.facebook.com/rumushproduction
// SoundCloud: https://soundcloud.com/rumushproduction
// YouTube: https://www.youtube.com/channel/UCs_Cn1R4iFrYOyc8liFucSQ
// Blog: https://mycelialcordsblog.wordpress.com/

(
fork{
	var buf1 = Buffer.alloc(s, 4e5, 2);
	var buf2 = Buffer.alloc(s, 2e5, 2);
	loop{
		var tim = [0.5, 1, 2, 3, 4].choose;
		var freq1 = [1, 5, 9, 20, 50].choose * [0.5, 2, 6, 4].choose;
		var freq2 = [1, 5, 9, 20, 50].choose * [0.5, 2, 6, 4].choose;
		("loop time" + tim).postln;
		("freq1" + freq1).postln;
		("freq2" + freq2).postln;
		play{
			var mainEnv = EnvGen.ar(Env.linen(tim*0.5, tim*8, tim), doneAction:2);
			var timA = Array.geom(3, tim, 0.5);
			var trig = Impulse.ar(timA);

			var pos = Demand.ar(trig[1], 0, Dxrand([0, 4e5*0.25, 4e5*0.4, 4e5*0.75], inf));
			var pos2 = Demand.ar(trig[2], 0, Dxrand([0, 2e5*0.25, 2e5*0.4, 2e5*0.75], inf));
			var src1 = BufRd.ar(2, buf1, Phasor.ar(trig[0], 1, 0, 4e5, pos))*0.5;
			var src2 = PinkNoise.ar(Decay.ar(trig[0]!2, 0.1, 250)).fold(-0.5, 0.5);
			var src3 = BufRd.ar(2, buf2, Phasor.ar(trig[0], 1, 0, 2e5, pos2))*0.75;
			var src4 = Mix.fill(8, {
				SinOsc.ar([freq1*100.rand, freq2*100.rand], 0, LFSaw.ar([Rand(0.25, 1), Rand(0.25, 1)])+1*0.5)*0.125
			});
			BufWr.ar(Blip.ar([freq1, freq2], LFNoise1.ar(freq1)+1*50)+src1, buf1, Phasor.ar(0, 1, 0, 2e5)+(LFNoise1.ar(freq1*0.1)+1*2e5));
			BufWr.ar(Saw.ar([freq1, freq2],0.25)+src3, buf2, LFNoise1.ar(freq2*0.1)+1*2e4);
			src2 = src2*0.125;

			(((src1+src2+src3+src4)*0.25).tanh)*mainEnv
		};tim*8.wait
	}
};
)
raw 1608 chars (focus & ctrl+a+c to copy)
reception
comments
g_montel user 12 Dec'15 06:51

cool !