-
Notifications
You must be signed in to change notification settings - Fork 5
/
hv.envfollow~.pd
81 lines (81 loc) · 1.93 KB
/
hv.envfollow~.pd
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
76
77
78
79
80
81
#N canvas 849 146 552 358 10;
#X obj 28 240 -~;
#X obj 28 216 sig~ 1;
#X obj 13 288 rpole~;
#X obj 116 32 loadbang;
#X obj 116 56 samplerate~;
#X obj 79 122 *;
#X obj 13 263 *~;
#X obj 13 319 outlet~;
#X obj 193 121 *;
#X text 228 220 temp = abs(in);
#X text 228 280 else;
#X obj 153 194 r~ \$0-env;
#X obj 67 319 s~ \$0-env;
#X text 238 260 env = temp + attack_coeff * (env - temp);
#X text 238 300 env = temp + release_coeff * (env - temp);
#X obj 116 79 / 1000;
#X text 228 187 http://www.musicdsp.org/archive.php?classid=2#97;
#X obj 13 9 inlet~;
#X obj 79 9 inlet attack (ms);
#X obj 193 9 inlet release (ms);
#X obj 13 150 abs~;
#N canvas 0 22 427 275 coeff 0;
#X obj 53 55 inlet;
#X obj 53 150 exp;
#X msg 53 172 \$1 10;
#X obj 53 194 line~;
#X obj 53 125 /;
#X msg 53 103 -4.60517 \$1;
#X obj 53 82 max 1;
#X obj 53 216 outlet~;
#X text 109 217 coeff = exp(-1 / (Fs * time_ms));
#X connect 0 0 6 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 7 0;
#X connect 4 0 1 0;
#X connect 5 0 4 0;
#X connect 6 0 5 0;
#X restore 193 149 pd coeff;
#N canvas 0 22 427 275 coeff 0;
#X obj 53 55 inlet;
#X obj 53 150 exp;
#X msg 53 172 \$1 10;
#X obj 53 194 line~;
#X obj 53 125 /;
#X msg 53 103 -4.60517 \$1;
#X obj 53 82 max 1;
#X obj 53 216 outlet~;
#X text 109 217 coeff = exp(-1 / (Fs * time_ms));
#X connect 0 0 6 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 7 0;
#X connect 4 0 1 0;
#X connect 5 0 4 0;
#X connect 6 0 5 0;
#X restore 79 152 pd coeff;
#X text 228 239 if (tmp > env);
#X obj 79 217 hv.multiplex~;
#X connect 0 0 6 1;
#X connect 1 0 0 0;
#X connect 2 0 7 0;
#X connect 2 0 12 0;
#X connect 3 0 4 0;
#X connect 4 0 15 0;
#X connect 5 0 22 0;
#X connect 6 0 2 0;
#X connect 8 0 21 0;
#X connect 11 0 24 3;
#X connect 15 0 5 1;
#X connect 15 0 8 1;
#X connect 17 0 20 0;
#X connect 18 0 5 0;
#X connect 19 0 8 0;
#X connect 20 0 6 0;
#X connect 20 0 24 2;
#X connect 21 0 24 1;
#X connect 22 0 24 0;
#X connect 24 0 0 1;
#X connect 24 0 2 1;