-
Notifications
You must be signed in to change notification settings - Fork 0
/
hp 2015 08.scd
58 lines (54 loc) · 1.22 KB
/
hp 2015 08.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
/*
Eduardo H Obieta
Hackpact 08 2015
Lorem ipsum
*/
/*
¿Cómo suenan dos párrafos de Lorem ipsum?
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent posuere velit nec ligula viverra eleifend. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed at magna congue, mollis enim nec, maximus mauris. In consectetur lectus in lacus porta ullamcorper. Vestibulum vel iaculis er..............
(ver lorem.sc...)
*/
(
a=thisProcess.nowExecutingPath.dirname;
a=a+"/lorem.sc";
b=a.replace(" /l","/l");
b=b.asString;
d=FileReader.read(b);
d=d.collectAs({ |e| e.asString.ascii}, Array).postcs;
)
d.size;
d[0].size;
s.prepareForRecord;
s.record;
(
SynthDef(\loremIpsum,
{ |freq = 262, amp = 0.1, durDur = 1, pan =0 |
var sig, env;
sig = SyncSaw.ar (freq, freq*0.7, amp)+Saw.ar(freq,amp);
env = EnvGen.ar(Env.perc(0.0015, durDur, 0.2), doneAction:2);
sig = Pan2.ar(sig*env, pan);
Out.ar(0, sig);
}).add
);
Synth(\loremIpsum);
(
var notas;
notas = Routine({
inf.do({
d[0].choose.yield;
d[1].choose.yield;
d[2].choose.yield;
})
});
r=Routine({
inf.do({
Synth(
\loremIpsum,
[ \freq, notas.next.postln.midicps, \amp, 0.7]
);
(1/8).yield
})
}).play
)
r.stop;
s.stopRecording;