«Cookiemonster v.1.1» by bernhard

on 31 Mar'20 10:04 in randomgranulargrainmultichannelcookiecrumble

Grainsynth Sampler based on the Example in the Documentation. Better version of v.1.0.

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
/// Cookiemonster v.1.1, corrected version of v.1.0. Old version had randomization outside the iterated function.

/// Grainsynth Sampler based on the Example in the Documentation. I'd call it crumblesynthesis.

/// CLOCK and DURATIOM randomized via LFNoise1, borders are set with mulclock, addclock, muldur and adddur. LFNoise1 folds to positiv with .abs, offset is added after. lfo1 and lfo2 are the speeds of LFNoise1.

/// For more silent parts approach addclock to zero or make it negativ

/// Env is randomized with PinkNoise

/// MouseX is playbackrate, MouseY is position in buffer. Blured with PinkNoise, intensity via vrate and vpos

/// Buffers can be switched on the fly with x.set(\buf...

/// For Multichannel expansion get rid of Splay.ar and adapt !8

/// use mono cookies, "ME WANT COOKIE!!!"


(
SynthDef(\cookiemonster, {
	arg gate = 1, lfo1 = 0.3, lfo2 = 0.7, vrate = 0.01, vpos = 0.003,
	mulclock = 64, addclock = 43, muldur = 1, adddur = 0.1, buf=0, amp = 0.1, out=0;

	var sig, atk, rel, dur;
	sig={BufGrain.ar(Impulse.kr(LFNoise1.kr(lfo1,mulclock).abs+addclock),dur=LFNoise1.kr(lfo2,muldur).abs+adddur,buf,MouseX.kr(0, 5)*PinkNoise.kr(vrate,1),MouseY.kr(0,1)*PinkNoise.kr(vpos,1),4,EnvGen.kr(Env([0, 1, 0], [atk=dur*PinkNoise.kr(0.9,0.5), rel=dur-atk], \sin, 1), gate,1,doneAction: 2))}!8;

	sig=Splay.ar(sig);
	sig=LeakDC.ar(sig*amp);
	Out.ar(out,sig.tanh);
}).add;
)

(
x=Synth(
	\cookiemonster,
	[\buf, Buffer.read(s,"/Path/to/my/cookiebox/cookie1.wav"),
]);)


x.set(\out,0)
x.set(\amp,0.1)
x.set(\mulclock,132)
x.set(\addclock,127)
x.set(\lfo1,1.12)
x.set(\vrate,0.4)

x.set(\muldur,0.01)
x.set(\adddur,0.05)
x.set(\lfo2,0.24)

x.set(\vpos,0.4)

x.set(\buf, Buffer.read(s,"/Path/to/my/cookiebox/cookie2.wav"))
x.set(\buf, Buffer.read(s,"/Path/to/my/cookiebox/cookie3.wav"))
x.set(\buf, Buffer.read(s,"/Path/to/my/cookiebox/cookie4.wav"))
x.set(\buf, Buffer.read(s,"/Path/to/my/cookiebox/cookie5.wav"))


x.free
raw 1998 chars (focus & ctrl+a+c to copy)
reception
comments