«Re: Granular electromaton variation» by Bruno Ruviaro

on 31 Oct'16 23:47 in texturecode forkmicrotimingrhythmgrainsgranulator

A variation of Granular electromaton by William Mox Drossard

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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// variation of http://sccode.org/1-4QN#c688

(
Server.local.waitForBoot({
	(
		z.free;
		z = Buffer.alloc(s, 512, 1);
		z.sine1(1.0 / [1, 2, 3, 4], true, true, true);
		
		{
			loop {
				SynthDef("g1",{ arg out=0, bufnum=0, dur=1, rate=1, pos=0, sdens=1, edens=1;
					
					var env, trig, dens, snd;
					
					dens = Line.kr(sdens,edens,dur);
					trig = [LFNoise0,SinOsc,Impulse,LFPulse,LFSaw].choose;
					trig = trig.ar(Line.kr(sdens,edens,dur));
					env = Env.perc(
						attackTime: rrand(0.1, 1),
						releaseTime: dur * rrand(0.5, 1),
						curve: -1).kr;
					
					snd = GrainBuf.ar(2,trig,1/dens,bufnum,rate,pos)*env;
					snd = [LPF, HPF].choose.ar(
						in: snd,
						freq: LFNoise2.kr(rrand(0.5, 4)).range(100, 1000)
					);
					snd = FreeVerb.ar(
						in: snd,
						mix: 0.4,
						room: 0.9,
						damp: 0.9,
						mul: 1
					) * Env.linen(0, dur+1, 1, 0.5).kr(doneAction: 2);
					
					snd = Limiter.ar(snd);
					
					Out.ar(out, snd);
				}).add;
				
				[1,2,4,8,16,32].choose.postln.wait;
			}
		}.fork;
		
		
		a = Pbind(
			\instrument, \g1,
			\dur, Pseq([
				Pseq([0.5, 0.1], 8),
				Pseq([0.25, 0.125, 0.125], 8),
				Pseq([0.125, 0.1], 8)
			],inf),
			\sdens, Pseq([9000,1000,500], inf),
			\edens,Prand([
				Pseq([900,1000,500]/10,4),
				Pseq([1, 2], 1)
			],inf),
			\rate, Pwhite(-10.0, 1),
			\pos,Pwhite(0.0, 1),
			\bufnum,z.bufnum
		);
		
		b = Pbind(
			\instrument,\g1,
			\dur,Pseq([4, 5, 6],inf),
			\sdens,Pseq([1,10,5],inf),
			\edens,Prand([
				Pseq([9000,10,50], 1),
				Pseq([1, 0.1], 3)
			],inf),
			\rate, Pwhite(1, 3),
			\pos,Pwhite(-10.0, 10),
			\bufnum,z.bufnum
		);
		
		c = Pbind(
			\instrument,\g1,
			\dur,Prand([1/2, Rest(4)],inf),
			\sdens,Pseq([900,1000,500,25],inf),
			\edens,Prand([
				Pseq([9000,1000,500,25],1),
				Pseq([1],4)
			],inf),
			\rate, Pwhite(-2, -1),
			\pos,Pwhite(-10, 10.0),
			\bufnum,z.bufnum
		);
		
		
		a.play;
		b.play;
		c.play;
	)
});
)
raw 2041 chars (focus & ctrl+a+c to copy)
reception
comments
William Mox Drossard user 07 Dec'16 09:24

Just reconnected to sccode after 4 years and I found and listened to your version. It i excellent. The whole atmosphere is less more irritating on a long run (due to lack of filtering on my side, HPF, LPF and FreeVerb). You managed to bring some textural and temporal nuances that where not there originally. Good job !

William Mox Drossard user 07 Dec'16 09:26

less, not less more, irritating ... And the code is way more readable too.