#N canvas 291 37 867 606 12;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-tab1 100 float 0;
#X coords 0 5 99 0 200 300 1 0 0;
#X restore 613 90 graph;
#X floatatom 67 414 3 0 0 0 - - - 0;
#X text 668 396 frequency;
#N canvas 876 177 279 294 startup 0;
#X obj 45 37 loadbang;
#X obj 45 61 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 45 90 f \$0;
#X text 35 199 This subpatch loads initial;
#X text 37 216 values in number boxes.;
#X msg 45 114 \; \$1-pole 60 \; \$1-zero 20;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X restore 481 541 pd startup;
#X floatatom 279 335 3 0 99 0 - \$0-pole - 0;
#X text 551 378 gain=0;
#X obj 98 537 filter-graph2 \$0-tab1;
#X obj 67 372 filter-graph1 100 22050;
#X text 788 392 22050;
#X obj 279 358 / 100;
#X floatatom 326 334 4 0 100 0 - \$0-zero - 0;
#X obj 326 357 / 100;
#X text 591 79 5;
#X text 608 389 0;
#X text 596 320 1;
#X text 601 523 updated for Pd version 0.39;
#X text 43 10 PEAKING FILTER;
#X floatatom 386 303 3 0 180 0 - \$0-pole - 0;
#X text 385 281 angle;
#X text 420 301 (degrees);
#X obj 440 372 sin;
#X obj 385 373 cos;
#X obj 385 324 * 3.14159;
#X obj 385 348 / 180;
#X obj 243 452 *;
#X obj 385 397 t b f;
#X obj 440 397 t b f;
#X obj 217 480 cpole~;
#X obj 242 511 czero~;
#X text 269 296 pole and zero;
#X text 287 311 radii (%);
#X obj 279 453 *;
#X obj 326 469 *;
#X obj 365 469 *;
#X text 31 45 To get a peaking filter \, start with a shelving filter but rotate the pole and zero to the point on the unit circle you want to amplify or attenuate. The rpole~ and rzero~ filters are replaced with their complex-valued siblings \, cpole~ and czero~. These filters take a (real \, imaginary) pair to filter and another (real-imaginary) pair to specify the pole or zero. As for rpole~ and rzero~ \, the coefficients may change at audio rate., f 74;
#X text 30 142 The outputs of cpole~ and czero~ are also in the form of a (real-imaginary) pair. Both outlets of cpole~ are connected to czero~ in this example \, but then since we want a real-valued filter \, we only take the real part of the (complex) output of czero~., f 74;
#X text 30 214 Here the pole and zero radii (p and q) control the center-frequency gain by the formula (1-q)/(1-p). The closer to 1 the radii \, the narrower the band affected. The non-peak gain \, (1+q)/(1+p) \, is close to 1 as long as p and q are at least 50% or so., f 74;
#X obj 67 344 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X obj 474 440 ../5.reference/set-dsp-tgl;
#X text 505 443 DSP on/off;
#X msg 474 477 \; pd dsp \$1;
#X connect 1 0 6 0;
#X connect 4 0 9 0;
#X connect 7 0 1 0;
#X connect 7 1 6 1;
#X connect 7 1 27 0;
#X connect 7 2 6 2;
#X connect 9 0 24 0;
#X connect 9 0 31 0;
#X connect 10 0 11 0;
#X connect 11 0 32 0;
#X connect 11 0 33 0;
#X connect 17 0 22 0;
#X connect 20 0 26 0;
#X connect 21 0 25 0;
#X connect 22 0 23 0;
#X connect 23 0 21 0;
#X connect 23 0 20 0;
#X connect 24 0 27 2;
#X connect 25 0 24 0;
#X connect 25 0 32 0;
#X connect 25 1 24 1;
#X connect 25 1 32 1;
#X connect 26 0 31 0;
#X connect 26 0 33 0;
#X connect 26 1 33 1;
#X connect 26 1 31 1;
#X connect 27 0 28 0;
#X connect 27 1 28 1;
#X connect 28 0 6 3;
#X connect 31 0 27 3;
#X connect 32 0 28 2;
#X connect 33 0 28 3;
#X connect 37 0 7 0;
#X connect 38 0 40 0;
