#N canvas 58 54 829 574 10;
#N canvas 249 0 883 878 REFERENCE 0;
#X text 114 161 Argument 0: name for state saving (required);
#X text 114 141 Summary: General purpose dynamics processor;
#X text 114 121 Name: e_dynproc;
#X text 114 181 Inlet 0: audio signal to apply effect on;
#X text 114 201 Inlet 1: reference audio signal ("sidechain");
#X text 114 306 Outlet 0: gain-modified audio signal.;
#X text 114 326 Outlet 1: gain envelope signal;
#X text 114 346 Outlet 2: on "save" \, the current state is reported
here.;
#X text 114 558 Tags: dynamics \, compressor \, limiter \, noisegate
\, expander \, sidechain;
#X text 114 425 compressor: comp1 > 1 \, comp2 = 1 (try comp2 < 1 for
that pumping sound);
#X text 114 458 expander: comp1 = 1 \, comp2 < 1;
#X text 114 478 limiter: comp1 very big \, comp2 = 1;
#X text 114 498 noise gate: comp1 = 1 \, comp2 very big;
#X text 114 366 Description: e_dynproc is a multipurpose dynamics processor
that can be used as a compressor \, a limiter \, a noisegate and an
expander depending on the values of comp1 and comp2 as follows:;
#X text 114 221 Inlet 2: Many method messages. dry <x>: dry/wet mix
\, 0=all dry. makeup <gain>: makeup gain in percentage units. thresh
<lvl>: threshold (dB) \, comp1 <lvl>: compression ratio 1 \, comp2
<lvl>: compression ratio 2 \, rel <time>: release time in msec \, att
<time>: attack time in msec. save: report current settings to last
outlet.;
#X text 114 528 The dry signal is delayed so as to avoid phasing effects
with the compressed version.;
#X coords 0 -1 1 1 450 500 1 100 100;
#X restore 5 48 pd REFERENCE;
#X text 5 24 e_dynproc - General purpose dynamics processor;
#N canvas 0 0 1074 690 e_dynproc-help 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-orig 22050 float 2;
#X coords 0 1 22050 -1 200 140 1;
#X restore 801 34 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-proc 22050 float 2;
#X coords 0 1 22050 -1 200 140 1;
#X restore 801 194 graph;
#X obj 614 163 tabwrite~ \$0-orig;
#X obj 614 216 tabwrite~ \$0-proc;
#X obj 614 62 tgl 15 0 empty empty scope 17 7 1 10 -262144 -1 -1 0
1;
#X text 77 572 expander:;
#X text 77 595 limiter:;
#X text 76 548 compressor:;
#X text 78 622 noise gate:;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-diff 22050 float 2;
#X coords 0 1 22050 0 200 140 1;
#X restore 802 362 graph;
#X obj 614 263 tabwrite~ \$0-diff;
#X obj 614 115 b;
#X msg 647 116 bang;
#N canvas 0 0 406 309 resize 0;
#X obj 65 129 s \$0-orig;
#X obj 62 162 s \$0-proc;
#X obj 62 190 s \$0-diff;
#X msg 74 99 resize \$1;
#X obj 74 70 inlet;
#X connect 3 0 0 0;
#X connect 3 0 1 0;
#X connect 3 0 2 0;
#X connect 4 0 3 0;
#X restore 799 568 pd resize;
#X msg 807 541 441;
#X msg 799 518 44100;
#X msg 842 541 22050;
#X obj 682 345 vu 15 120 empty compressed 20 -12 1 10 -66577 -1 1 0
;
#X obj 174 287 r \$0-CTL;
#X obj 72 221 *~;
#X obj 90 174 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 614 88 metro 1300;
#X obj 73 391 soundoutput;
#X obj 615 345 vu 15 120 empty orig -20 -12 1 10 -66577 -1 1 0;
#N canvas 0 0 504 346 random-vol 0;
#X obj 148 138 random 100;
#X obj 148 212 line~;
#X obj 148 190 pack 0 40;
#X obj 239 146 random 80;
#X obj 148 80 inlet;
#X obj 148 236 outlet~;
#X obj 148 166 / 100;
#X obj 148 111 metro 150;
#X connect 0 0 6 0;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 3 0 2 1;
#X connect 4 0 7 0;
#X connect 6 0 2 0;
#X connect 7 0 0 0;
#X connect 7 0 3 0;
#X restore 90 192 pd random-vol;
#X obj 71 144 noise~;
#X text 177 571 comp1 = 1 \, comp2 < 1;
#X text 178 594 comp1 very big \, comp2 = 1;
#X text 176 547 comp1 > 1 \, comp2 = 1 (try comp2 < 1 for that pumping
sound);
#X text 176 623 comp1 = 1 \, comp2 very big;
#X obj 316 193 g_nbx comp1;
#X obj 316 222 g_nbx comp2;
#X obj 316 254 g_nbx att;
#X obj 316 285 g_nbx rel;
#X obj 316 317 g_nbx makeup;
#X obj 316 409 s \$0-CTL;
#X obj 316 378 g_hsl dry 0 1;
#N canvas 0 0 450 300 compressor 0;
#X obj 149 103 inlet;
#X obj 149 153 outlet;
#X msg 149 128 comp1 \$1 \, comp2 1;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 316 59 pd compressor;
#X floatatom 316 39 5 0 0 0 ratio - -;
#X floatatom 441 40 5 0 0 0 - - -;
#N canvas 0 0 450 300 noisegate 0;
#X obj 149 103 inlet;
#X obj 149 153 outlet;
#X msg 149 128 comp1 1 \, comp2 \$1;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 441 60 pd noisegate;
#X floatatom 326 89 5 0 0 0 - - -;
#N canvas 0 0 450 300 limiter 0;
#X obj 149 103 inlet;
#X obj 149 153 outlet;
#X msg 149 128 comp1 \$1 \, comp2 1;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 326 109 pd limiter;
#X floatatom 442 88 5 0 0 0 - - -;
#N canvas 0 0 450 300 expander 0;
#X obj 149 54 inlet;
#X obj 149 153 outlet;
#X msg 149 128 comp1 1 \, comp2 \$1;
#X msg 149 80 1 \$1;
#X obj 149 103 /;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X restore 442 108 pd expander;
#X obj 316 347 g_nhsl thresh 0 120;
#X obj 107 247 s~ \$0-orig~;
#X obj 625 139 r~ \$0-orig~;
#X obj 89 364 s~ \$0-comp~;
#X obj 622 193 r~ \$0-comp~;
#X obj 124 334 s~ \$0-env~;
#X obj 626 243 r~ \$0-env~;
#N canvas 0 0 390 284 vumeter 0;
#X obj 190 112 env~;
#X obj 190 137 - 100;
#X obj 64 117 env~;
#X obj 64 142 - 100;
#X obj 64 92 r~ \$0-orig~;
#X obj 189 91 r~ \$0-comp~;
#X obj 64 170 outlet;
#X obj 190 163 outlet;
#X connect 0 0 1 0;
#X connect 1 0 7 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 4 0 2 0;
#X connect 5 0 0 0;
#X restore 614 300 pd vumeter;
#X text 65 522 e_dynproc had several modes of operation:;
#X text 64 656 Check out the subpatches above for preset modes.;
#X text 400 261 default: 50;
#X text 398 294 default: 50;
#X text 400 324 units: percent;
#X obj 201 419 u_cocollect;
#X msg 243 270 save;
#X obj 243 295 t a b;
#X msg 201 449 comp2 1 \, comp1 17 \, rel 200 \, att 20 \, thresh 70.8304
\,;
#X msg 206 322 help;
#X text 26 18 e_dynproc - General purpose dynamics processor;
#X obj 72 312 e_dynproc MYDYN;
#X connect 4 0 21 0;
#X connect 11 0 2 0;
#X connect 11 0 3 0;
#X connect 11 0 10 0;
#X connect 12 0 11 0;
#X connect 14 0 13 0;
#X connect 15 0 13 0;
#X connect 16 0 13 0;
#X connect 18 0 64 2;
#X connect 19 0 46 0;
#X connect 19 0 64 0;
#X connect 19 0 64 1;
#X connect 20 0 24 0;
#X connect 21 0 11 0;
#X connect 24 0 19 1;
#X connect 25 0 19 0;
#X connect 30 0 31 0;
#X connect 31 0 32 0;
#X connect 32 0 33 0;
#X connect 33 0 34 0;
#X connect 34 0 45 0;
#X connect 36 0 35 0;
#X connect 37 0 30 0;
#X connect 38 0 37 0;
#X connect 39 0 40 0;
#X connect 40 0 30 0;
#X connect 41 0 42 0;
#X connect 42 0 30 0;
#X connect 43 0 44 0;
#X connect 44 0 30 0;
#X connect 45 0 36 0;
#X connect 47 0 2 0;
#X connect 49 0 3 0;
#X connect 51 0 10 0;
#X connect 52 0 23 0;
#X connect 52 1 17 0;
#X connect 58 0 61 0;
#X connect 59 0 60 0;
#X connect 60 0 64 2;
#X connect 60 1 58 1;
#X connect 62 0 64 2;
#X connect 64 0 48 0;
#X connect 64 0 22 0;
#X connect 64 0 22 1;
#X connect 64 1 50 0;
#X connect 64 2 58 0;
#X restore 500 166 pd e_dynproc-help;
#X text 499 145 Please look inside for a detailed example:;
#X obj 504 310 e_dynproc <NAME>;
