#N canvas 549 23 530 666 12;
#X declare -stdpath ./;
#X obj 58 125 osc~ 100;
#X msg 67 152 clear;
#X text 17 407 The transfer function is H(Z) = 1/(1 - aZ^-1).;
#X obj 19 10 cpole~;
#X obj 89 208 sig~;
#X obj 121 231 sig~;
#X obj 153 255 sig~;
#X obj 58 280 cpole~ 0.9 0.4;
#X text 196 297 coefficient (real and imaginary part);
#X text 16 358 where y[n] is the output \, x[n] the input \, and a[n] the filter coefficient (all complex numbers). The filter is unstable if/when |a[n]|>1.;
#X msg 79 179 set 0.6 0.8;
#X text 48 338 y[n] = x[n] + a[n] * y[n-1];
#N canvas 796 231 441 392 test 0;
#X obj 90 85 osc~;
#X floatatom 90 52 5 0 0 0 - - - 0;
#X obj 146 304 env~ 16384;
#X floatatom 146 328 5 0 0 0 - - - 0;
#X obj 90 112 *~;
#X msg 40 113 set 1;
#X floatatom 334 113 4 -1000 1000 0 - - - 0;
#X text 138 14 Stuff to test it:;
#X obj 215 123 cos~;
#X obj 146 225 cpole~;
#X obj 258 75 phasor~;
#X floatatom 258 48 5 0 0 0 - - - 0;
#X floatatom 146 52 5 0 0 0 - - - 0;
#X obj 177 113 tgl 17 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X obj 146 112 *~;
#X obj 146 85 phasor~;
#X floatatom 321 46 5 0 0 0 - - - 0;
#X obj 321 75 / 1000;
#X obj 258 113 -~ 0.25;
#X obj 258 140 cos~;
#X obj 334 142 / 1000;
#X obj 215 178 *~;
#X obj 258 178 *~;
#X obj 233 304 env~ 16384;
#X floatatom 233 328 5 0 0 0 - - - 0;
#X obj 49 291 output~;
#X obj 258 238 declare -stdpath ./;
#X obj 121 114 tgl 17 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X connect 0 0 4 0;
#X connect 1 0 0 0;
#X connect 2 0 3 0;
#X connect 4 0 9 0;
#X connect 5 0 9 0;
#X connect 6 0 20 0;
#X connect 8 0 21 0;
#X connect 9 0 2 0;
#X connect 9 0 25 0;
#X connect 9 0 25 1;
#X connect 9 1 23 0;
#X connect 10 0 18 0;
#X connect 10 0 8 0;
#X connect 11 0 10 0;
#X connect 12 0 15 0;
#X connect 13 0 14 1;
#X connect 14 0 9 0;
#X connect 15 0 14 0;
#X connect 16 0 17 0;
#X connect 17 0 10 1;
#X connect 18 0 19 0;
#X connect 19 0 22 0;
#X connect 20 0 22 1;
#X connect 20 0 21 1;
#X connect 21 0 9 2;
#X connect 22 0 9 3;
#X connect 23 0 24 0;
#X connect 27 0 4 1;
#X restore 410 555 pd test;
#X obj 81 603 lop~;
#X text 8 602 see also:;
#X obj 179 535 rzero~;
#X obj 119 558 cpole~;
#X obj 119 535 rpole~;
#X obj 239 535 rzero_rev~;
#X obj 179 558 czero~;
#X obj 239 558 czero_rev~;
#X text 318 535 real;
#X text 317 557 complex;
#X text 116 516 1-pole;
#X text 176 516 1-zero;
#X text 243 500 1-zero \, reversed, f 8;
#X text 25 540 summary of raw filters:, f 12;
#X obj 122 603 hip~;
#X obj 163 603 bp~;
#X obj 198 603 vcf~;
#X text 279 603 - user-friendly filters;
#X obj 239 603 bob~;
#X obj 379 475 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#N canvas 798 148 456 264 Read-More 0;
#X obj 11 59 inlet;
#X obj 11 190 pdcontrol;
#X msg 11 139 browse http://msp.ucsd.edu/techniques/latest/book-html/node127.html;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 379 509 pd Read-More;
#X obj 11 632 biquad~;
#X text 186 632 - not so friendly;
#X obj 72 631 fexpr~;
#X obj 127 631 slop~, f 7;
#X text 328 631 updated for Pd version 0.43;
#X text 71 10 - complex one-pole filter;
#X obj 4 38 cnv 1 520 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 4 592 cnv 1 520 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 723 131 572 406 reference 0;
#X obj 8 42 cnv 5 550 5 empty empty INLETS: 8 18 0 13 #202020 #000000 0;
#X obj 7 73 cnv 1 550 1 empty empty 1st: 8 12 0 13 #9f9f9f #000000 0;
#X obj 8 238 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 7 380 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X obj 8 327 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X text 117 80 signal -;
#X obj 29 14 cpole~;
#X text 81 14 - complex one-pole filter;
#X obj 7 141 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #9f9f9f #000000 0;
#X obj 7 174 cnv 1 550 1 empty empty 3rd: 8 12 0 13 #9f9f9f #000000 0;
#X obj 7 205 cnv 1 550 1 empty empty 4th: 8 12 0 13 #9f9f9f #000000 0;
#X text 180 80 signal to filter (real part)., f 49;
#X text 117 148 signal -;
#X text 180 148 signal to filter (imaginary part)., f 49;
#X text 117 180 signal -;
#X text 117 213 signal -;
#X text 180 213 filter coefficient (imaginary part)., f 49;
#X text 180 180 filter coefficient (real part)., f 49;
#X text 124 118 clear -;
#X text 180 98 set internal state (real and imaginary part)., f 49;
#X text 180 118 clear internal state to zero (same as "set 0 0").;
#X text 71 352 1) list - real and imaginary part of coefficient (default 0 0)., f 63;
#X text 117 300 signal - filtered signal \, imaginary part.;
#X text 117 269 signal - filtered signal \, real part.;
#X text 33 98 set <float \, float> -;
#X obj 8 263 cnv 1 550 1 empty empty 1st: 8 12 0 13 #9f9f9f #000000 0;
#X obj 7 293 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #9f9f9f #000000 0;
#X restore 355 9 pd reference;
#X text 449 9 <= click;
#X text 15 429 Pd also provides a suite of user-friendly filters. This and other raw filters are provided for situations which the user-friendly ones can't handle. See Chapter 8 of http://msp.ucsd.edu/techniques.htm for an introduction to the necessary theory (click) -->, f 69;
#X text 23 47 [cpole~] filters a complex audio signal (first two inlets) via a raw one-pole (recursive) filter \, whose coefficients are controlled by creation arguments or by another complex audio signal (remaining two inlets)., f 68;
#X text 124 125 <-- signal to filter (real part);
#X text 112 152 <-- clear internal state to zero;
#X text 166 179 <-- set internal state (real & imaginary parts);
#X text 125 207 <-- signal to filter (imaginary part);
#X text 157 231 <-- filter coefficient (real part);
#X text 190 255 <-- filter coefficient (imaginary part);
#X text 167 281 <-- creation arguments initialize filter;
#X text 14 316 The action of [cpole~] is:;
#X connect 0 0 7 0;
#X connect 1 0 7 0;
#X connect 4 0 7 1;
#X connect 5 0 7 2;
#X connect 6 0 7 3;
#X connect 10 0 7 0;
#X connect 32 0 33 0;
