forked from collexion/wavepool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrisset_delay.ck
60 lines (51 loc) · 1.19 KB
/
risset_delay.ck
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
adc.left => LiSa saveme => dac;
adc.left => NRev rev => dac;
Pan2 p;
-1 => p.pan;
0.1 => rev.mix;
//0 => revloop.mix;
5::second => saveme.duration;
1::second => dur slowest;
0.1::second => dur fastest;
20::second => dur accelerationtime;
now => time lastcycletime => time cycletime;
0::second => dur elapsed;
1 => saveme.loop;
1 => saveme.loopRec;
1::second => dur tick;
while (true)
{
1 => saveme.record;
0::samp => saveme.recPos;
tick => now;
0::samp => saveme.playPos;
1 => saveme.play;
tick => now;
tick - 0.05::second => tick;
if (tick == 0.5::second)
slowest => tick;
<<<tick>>>;
1 => saveme.loopRec;
}
while (true)
{
1 => saveme.record;
now - lastcycletime +=> elapsed;
now => lastcycletime;
if (elapsed > accelerationtime)
elapsed % accelerationtime => elapsed;
//elapsed % accelerationtime => cycletime;
elapsed/accelerationtime => float t;
<<<elapsed , "/" , accelerationtime , " = " , t>>>;
if (t > 1) 1 => t;
0::samp => saveme.recPos;
slowest*t + fastest*(1-t) => dur currentLapse => now;
<<<currentLapse>>>;
0 => saveme.record;
50::ms => saveme.rampUp;
//0 => saveme.playPos;
0 => saveme.playPos;
1 => saveme.play;
currentLapse => now;
//currentLapse => now;
}