#N canvas 339 38 869 594 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;
#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 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 28 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 75;
#X obj 67 344 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#N canvas 876 177 279 294 init 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 352 523 pd init;
#X text 28 39 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 75;
#X text 28 148 The outputs of [cpole~] and [czero~] are also in the form of a (real and 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 75;
#X obj 91 8 cnv 5 5 25 empty empty Peaking\ Filter 15 13 0 16 #dfdfdf #202020 0;
#X connect 1 0 5 0;
#X connect 3 0 8 0;
#X connect 6 0 1 0;
#X connect 6 1 5 1;
#X connect 6 1 24 0;
#X connect 6 2 5 2;
#X connect 8 0 21 0;
#X connect 8 0 28 0;
#X connect 9 0 10 0;
#X connect 10 0 29 0;
#X connect 10 0 30 0;
#X connect 14 0 19 0;
#X connect 17 0 23 0;
#X connect 18 0 22 0;
#X connect 19 0 20 0;
#X connect 20 0 18 0;
#X connect 20 0 17 0;
#X connect 21 0 24 2;
#X connect 22 0 21 0;
#X connect 22 0 29 0;
#X connect 22 1 21 1;
#X connect 22 1 29 1;
#X connect 23 0 28 0;
#X connect 23 0 30 0;
#X connect 23 1 30 1;
#X connect 23 1 28 1;
#X connect 24 0 25 0;
#X connect 24 1 25 1;
#X connect 25 0 5 3;
#X connect 28 0 24 3;
#X connect 29 0 25 2;
#X connect 30 0 25 3;
#X connect 32 0 6 0;
