forked from patricksebastien/mtl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
adsr~-help.pd
63 lines (63 loc) · 2.23 KB
/
adsr~-help.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
#N canvas 1 82 1364 661 10;
#X obj 32 406 osc~ 440;
#X obj 32 435 *~;
#X obj 31 460 *~ 0.3;
#X text 28 -4 Description: Simple ADSR enveloppe generator.;
#X text 28 26 Arguments: Attack time \, Decay time \, Sustain level
\, Release time;
#N canvas 117 168 450 300 (subpatch) 0;
#X array \$0curve 44100 float 2;
#X coords 0 1 44100 -1 200 140 1;
#X restore 504 314 graph;
#X obj 199 537 tabwrite~ \$0curve;
#X obj 245 486 print attack_started;
#X obj 335 448 print release_done;
#X obj 290 467 print attack+decay_done;
#X text 320 521 Arguments: attack_time decay_time sustain_level release_time
;
#X text 320 537 Defaults: 250 250 1 250;
#X text 26 56 Inlets: MIDI note velocity \, A \, D \, S \, R;
#X text 26 73 Outlet_1: Line level.;
#X obj 30 485 mtl/out~;
#X text 40 571 synth.adsr~ does not retrigger the ATTACK if it has
not been RELEASed before. This is to ensure better compatibility when
switching between sources or moving the playback head.;
#X text 27 11 Comments: Works best with noteClose;
#X text 26 97 tags: control~;
#X obj 643 88 cnv 15 200 20 empty empty /adsr/ 2 12 0 8 -258401 -262144
0;
#X obj 645 117 nbx 5 14 -1e+37 1e+37 0 0 /adsr/attack-time /adsr/attack-time_
attack-time 65 7 0 10 -262144 -1 -1 1 256;
#X obj 200 417 mtl/adsr~ /id adsr 70 50 0.5 100;
#X obj 645 136 nbx 5 14 -1e+37 1e+37 0 0 /adsr/decay-time /adsr/decay-time_
decay-time 65 7 0 10 -262144 -1 -1 226 256;
#X obj 648 155 hsl 128 15 0 1 0 0 /adsr/sustain-level /adsr/sustain-level_
sustain-level 135 5 0 10 -262144 -1 -1 0 1;
#X obj 646 175 nbx 5 14 -1e+37 1e+37 0 0 /adsr/release-time /adsr/release-time_
release-time 65 7 0 10 -262144 -1 -1 468 256;
#X obj 229 506 r \$0draw;
#X obj 156 244 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699
-1 -1;
#X msg 211 297 127;
#X msg 156 321 0;
#X obj 156 268 t b b b;
#X text 176 241 Click to generate a 700 ms full volume trigger.;
#X obj 156 296 del 700;
#X obj 243 298 s \$0draw;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 14 0;
#X connect 2 0 14 1;
#X connect 20 0 1 1;
#X connect 20 0 6 0;
#X connect 20 1 7 0;
#X connect 20 2 9 0;
#X connect 20 3 8 0;
#X connect 24 0 6 0;
#X connect 25 0 28 0;
#X connect 26 0 20 0;
#X connect 27 0 20 0;
#X connect 28 0 30 0;
#X connect 28 1 26 0;
#X connect 28 2 31 0;
#X connect 30 0 27 0;