-
Notifications
You must be signed in to change notification settings - Fork 0
/
hp 2015 13.scd
66 lines (66 loc) · 1.28 KB
/
hp 2015 13.scd
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
/*
Eduardo H Obieta
Hackpact 13 2015
G L I T C H C O L L I D E R 3 D¡¡¡¡
*/
s.boot;
(
SynthDef(\hp13, { | out, gate = 0 |
var x;
x = EnvGen.kr(Env.perc(0.01,0.1,1), doneAction: 2) * BPF.ar(WhiteNoise.ar(0.7),3500,0.8,0.5);
Out.ar(out, x)
}).add;
)
(
Tdef(\hackpact13,
{
Synth(\hp13);
a=thisProcess.nowExecutingPath.dirname.postcln;
0.5.wait;
Synth(\hp13);
a=a+"/hackpact13.obj".postcln;
0.5.wait;
Synth(\hp13);
b=a.replace(" /h","/h").postcln;
Synth(\hp13);
0.5.wait;
b=b.asString.postcln;
Synth(\hp13);
0.5.wait;
d=FileReader.read(b,true,true).postcs;
Synth(\hp13);
0.5.wait;
c=b.replace(".obj","_glitched.obj".postcln);
Synth(\hp13);
0.5.wait;
(
o = File.new(c,"wb");
r=Routine{
d.size.do{arg count;
0.005.wait;
"fucking vertex".postcln;
Synth(\hp13);
if (d[count][0]=="v"&&0.3.coin,
{
d[count][1]=(d[count][1].asFloat)*Array.series(21,0.9,0.01).choose;
d[count][2]=(d[count][2].asFloat)*Array.series(21,0.9,0.01).choose;
d[count][3]=(d[count][3].asFloat)*Array.series(21,0.9,0.01).choose;
[count].post;
}, {
[count].post;" f ".post}
);
d[count] = d[count].asString;
d[count]=d[count].replace("[ "," ");
d[count]=d[count].replace("v,","v ");
d[count]=d[count].replace(", "," ");
d[count]=d[count].replace(" ]","");
d[count].post;
o.write(d[count].asString);
o.write($\n);
};
o.close;
}.play
);
}
).play
)