«sandlizard» by grirgz

on 29 Dec'14 15:31 in padlizardchurch
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
(
Ndef(\sandlizard).fadeTime = 0.2;
Ndef(\sandlizard).quant = 1;
Ndef(\sandlizard).put(0, { arg amp=0.1;
	var sig;
	var sig1, sig2, sig3, sig4, sig5, sig6, sig7, sig8;
	var freq = 170;
	var size;
	var time;
	var env1, env2, env3;
	var env0;
	var osig;
	var chords;
	var bufnum = LocalBuf(s.sampleRate * 4,2);
	var bufgate, stuttrig, choosetrig, recordtrig;
	var attack, decay, stutter;
	var env;
	bufnum.clear;
	chords = Duty.kr(4, 0, Dseq([
		Dseq([
			[0,4,7],
			[0,3,6],
		],1),
		[0,5,8,3+24],
		[2,5,8],


		Dseq([
			[0,4,7],
			[0,3,6],
		],2),
		[1,4,8,14],
		[0,9,6],
		[0,5,8,3+24],
		[2,5,8],
	],inf)).lag(0.4).midiratio ;
	freq = freq * [1/2,1/4,1/8,1,2,3,4];
	freq = freq *.t chords;


	// gen

	sig = SinOsc.ar(freq);
	sig = sig.flat;

	// stage1

	sig1 = Friction.ar(sig, friction: 0.41322e-7 * SinOsc.kr(0.01/(1..sig.size)).range(1,11111), mass: 1.05501 * SinOsc.kr(0.1/(1..sig.size)+0.01).range(1,41));
	sig = SelectX.ar(SinOsc.kr(1/(1..sig.size)+0.01).range(0.5,1) , [sig, sig1]);

	sig = Limiter.ar(sig, (-1).dbamp);

	// stage2

	sig1 = sig * sig.clip2(0.1);
	sig = SelectX.ar(SinOsc.kr(0.1/(1..sig.size)+0.001+(pi/14)).range(0.5,1) , [sig, sig1]);
	sig = sig * SinOsc.kr(1/(1..sig.size)+(pi/100)).range(0,1);

	// panning

	sig = Pan2.ar(sig, {LFNoise1.kr(1/2).range(-1.0,1.0)} ! sig.size, amp).flop;

	// fx1

	bufgate = Duty.kr(1/2, 0, Dseq([
		0,0,0,0, 0,0,0,0,
		0,0,0,0, 0,0,0,0,
		0,0,0,0, 0,0,0,1,
		0,1,0,0, 0,0,0,0,
		0,0,0,1, 0,0,0,1,
		0,1,1,1, 0,0,1,0,
		1,
	],inf));
	choosetrig = bufgate > 0;
	stutter = Duty.kr(1, 0, Dseq(1/[
		2,16,4,8,
		4,8,3,10,
		8,8,2,12,
		6,2,8,16,
		4
	],inf));
	stuttrig = TDuty.ar(stutter , choosetrig + Changed.kr(stutter), 1);
	recordtrig = Trig1.kr(choosetrig, 0.01);


	sig = sig.flop.sum;
	attack = 0.01;
	decay = 0.01;
	env = EnvGen.ar(Env([0,1,1,0],[attack, stutter-attack-decay, decay]), stuttrig);
	RecordBuf.ar(sig, bufnum, 0, 1, 0, run:1,loop:1,trigger: recordtrig,doneAction:0);
	sig1 = PlayBuf.ar(2, bufnum, rate:1/2, trigger:stuttrig,startPos:0, loop:1) * env;
	sig1 = sig1 * 1.2;
	sig = SelectX.ar( bufgate.lag(0.01)/1.2, [sig, sig1]);

	// fx2

	sig1 = sig.round(0.1 * SinOsc.kr(1/7).range(0,1));
	sig1 = BPF.ar(sig1 ! freq.flat.size, freq.flat, 0.1).sum;
	sig = SelectX.ar( Duty.kr(1, 0, Dseq([
		0,0,0,0, 0,0,0,0,
		0,0,0,0, 0,0,0,0,
		0,0,1,0, 0,0,0,0,
		0,1,0,0, 1,1,0,0,
		1,0,1,0, 0,0,1,0,
		1
	],inf)).lag(0.41)/1.2, [sig, sig1]);

	// fadein

	sig = sig * Line.ar(0.001,1,20).explin(0.001,1,0,1);

	sig;
}).play;


)
raw 2620 chars (focus & ctrl+a+c to copy)
reception
comments
yvan user 15 Feb'17 15:54

thanks for sharing!

lightrate user 21 Mar'17 06:59

Very emotional