#N canvas 479 23 526 688 12;
#X declare -stdpath ./;
#N canvas 0 0 450 300 (subpatch) 0;
#X array adsr-output 44100 float 0;
#X coords 0 1.02 44100 -1.02 200 130 1;
#X restore 225 380 graph;
#X text 237 516 ------ 1 second ------;
#X obj 58 128 r trigger;
#X obj 75 219 tabwrite~ adsr-output;
#X obj 89 191 r graphit;
#X obj 261 132 del 500;
#X msg 250 198 \; pd dsp 1 \; trigger 1 \; graphit bang;
#X msg 249 268 \; pd dsp 1 \; trigger 0 \; graphit bang;
#X msg 261 157 \; trigger 0;
#X text 428 500 -1;
#X text 430 375 1;
#X text 48 41 This patch introduces a simple "adsr" abstraction we'll use frequently. You can click on the "adsr" object to see what's inside.;
#X text 53 557 The active ingredient of the ADSR envelope generator is a single line~ which gets passed messages to make the attack and release behavior. You can retrigger the ADSR envelope generator all you wish without having to wait for attacks or releases to finish;
#X text 113 11 ENVELOPE GENERATOR ABSTRACTION;
#X obj 58 154 adsr 1 100 200 50 300;
#X text 293 647 updated for Pd version 0.37;
#X obj 75 251 osc~ 440;
#X obj 57 276 *~;
#X obj 57 311 output~;
#X text 349 217 <= attack only;
#X text 352 292 <= release only;
#X obj 387 10 declare -stdpath ./;
#X obj 250 99 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X text 273 98 <-- attack and delayed release;
#X connect 2 0 14 0;
#X connect 4 0 3 0;
#X connect 5 0 8 0;
#X connect 14 0 3 0;
#X connect 14 0 17 0;
#X connect 16 0 17 1;
#X connect 17 0 18 0;
#X connect 22 0 6 0;
#X connect 22 0 5 0;
