aboutsummaryrefslogtreecommitdiff
path: root/instruments/madsr.pd
blob: 919197eaaaac6d332a9557a9e30af3a48979404a (plain)
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
#N canvas 466 68 634 581 10;
#X text 52 50 This patch is used as an abstraction in 25.envelope.pd
;
#X obj 95 108 inlet;
#X obj 298 111 inlet;
#X text 91 79 trigger;
#X obj 95 138 sel 0;
#X obj 144 138 t b;
#X obj 362 112 inlet;
#X obj 371 422 line~;
#X obj 410 112 inlet;
#X obj 459 111 inlet;
#X obj 504 111 inlet;
#X msg 95 191 stop;
#X text 378 86 Traditional A \, D \, S \, R;
#X text 296 88 level;
#X text 32 302 ATTACK;
#X obj 371 449 outlet~;
#X text 7 325 recall level;
#X text 7 345 and pack with;
#X text 8 365 attack time;
#X text 28 124 if zero;
#X text 29 141 release;
#X text 17 183 and cancel;
#X text 17 199 decay;
#X text 148 120 bang if attack;
#X text 183 294 on attack \, set a;
#X text 147 307 delay to go to sustain;
#X text 189 324 recall sustain value;
#X text 185 347 multiply by overall level;
#X text 220 370 pack with decay time;
#X text 510 386 on release ramp;
#X text 511 403 back to zero;
#X text 63 12 adsr - arguments: level \, attack time \, decay time
\, sustain level \, release time;
#X text 17 487 When you send this patch a nonzero trigger it schedules
a line~ to do an attack and decay \, and if zero \, it starts the release
ramp.;
#X text 18 533 Objects such as f and pack can be given dollar sign
arguments to initialize their contents from adsr's creation arguments.
Inlets are supplied to update them on the fly.;
#X obj 104 334 f;
#X obj 309 301 del;
#X obj 338 324 f;
#X obj 364 346 *;
#X obj 371 369 pack 0 0;
#X obj 517 360 pack 0 0;
#X obj 104 359 pack 0 0;
#X connect 1 0 4 0;
#X connect 2 0 34 1;
#X connect 2 0 37 1;
#X connect 4 0 11 0;
#X connect 4 0 39 0;
#X connect 4 1 5 0;
#X connect 5 0 34 0;
#X connect 5 0 35 0;
#X connect 6 0 35 1;
#X connect 6 0 40 1;
#X connect 7 0 15 0;
#X connect 8 0 38 1;
#X connect 9 0 36 1;
#X connect 10 0 39 1;
#X connect 11 0 35 0;
#X connect 34 0 40 0;
#X connect 35 0 36 0;
#X connect 36 0 37 0;
#X connect 37 0 38 0;
#X connect 38 0 7 0;
#X connect 39 0 7 0;
#X connect 40 0 7 0;