-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhp 2015 14.scd
75 lines (70 loc) · 1.19 KB
/
hp 2015 14.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
67
68
69
70
71
72
73
74
75
/*
Eduardo H Obieta
Hackpact 14 2015
*/
s.boot;
(
SynthDef(\hp14,
{ | frec = 20, frec2 = 440, amp = 0.7, gate = 1|
var sin, env;
sin = GVerb.ar(FreeVerb.ar(SyncSaw.ar(frec,frec2, amp),0.7,0.7,0.2),8,1,0.4,0.2);
env = EnvGen.ar(Env.perc(0.02,0.3,1), gate, doneAction:2);
Out.ar(0,Pan2.ar(sin*env,0));
}
).add
)
(
SynthDef(\hp14b,
{ | frec = 80, amp = 0.8, gate = 1|
var sin, env;
sin = SinOsc.ar(frec, 0, amp)*Saw.ar(frec/2,amp);
env = EnvGen.ar(Env.perc(0.3,2,1), gate, doneAction:2);
Out.ar(0,Pan2.ar(sin*env,0));
}
).add
)
Synth(\hp14);
Synth(\hp14b);
s.prepareForRecord;
s.record;
(
var nota, tiempo;
tiempo = Routine({
inf.do({
[1/4,1/8,1/6,1/16].choose.yield;
})
});
nota = Routine({
inf.do({
70.yield;
72.yield;
74.yield;
75.yield;
77.yield;
79.yield;
81.yield;
if (0.6.coin, {
58.yield;
60.yield;
62.yield;
63.yield
});
if (0.7.coin, {
[82,84,86,87].choose.yield;
})
})
});
Routine{
inf.do({
Synth(\hp14, [\frec2, nota.next.midicps, \frec, nota.next*0.25, \amp, 0.2+tiempo.next]);
tiempo.next.wait;
})
}.play;
Routine{
inf.do({
Synth(\hp14b, [\frec, nota.next, \amp, 0.7+tiempo.next]);
tiempo*4.next.wait;
})
}.play
);
s.stopRecording;