-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhorror.ck
More file actions
31 lines (25 loc) · 701 Bytes
/
horror.ck
File metadata and controls
31 lines (25 loc) · 701 Bytes
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
BandedWG stk => dac;
// Delays
stk => Delay delays[2] => dac;
1::second => delays[0].max => delays[1].max;
500::ms => delays[0].delay;
250::ms => delays[1].delay;
0.5 => delays[0].gain => delays[1].gain;
delays[0] => delays[1];
delays[1] => delays[0];
[0, 4, 7, 11] @=> int notes[];
// [0, 3, 5, 9] @=> int notes[];
48 => int offset;
0.5 => stk.bowPressure;
3 => stk.preset;
while (true)
{
Math.random2f (0.1, 0.6) => stk.bowPressure;
Math.random2(0, 2) => int position;
(position * 12) + offset + notes[Math.random2(0, notes.cap() - 1)] => int note;
note => Std.mtof => stk.freq;
1.0 => stk.startBowing;
2800::ms => now;
1.0 => stk.stopBowing;
200::ms => now;
}