#N canvas 619 313 610 611 12;
#X obj 54 95 osc~ 100;
#X msg 62 122 clear;
#X text 12 374 The transfer function is H(Z) = 1/(1 - aZ^-1).;
#X text 115 121 <-- clear internal state to zero;
#N canvas 168 90 498 357 test 0;
#X obj 76 78 osc~;
#X floatatom 76 55 5 0 0 0 - - -;
#X obj 18 287 env~ 16384;
#X floatatom 18 311 5 0 0 0 - - -;
#X obj 104 107 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 76 105 *~;
#X msg 85 132 set 1;
#X floatatom 350 112 4 -1000 1000 0 - - -;
#X obj 215 315 dac~;
#X obj 215 279 *~;
#X text 80 18 Stuff to test it:;
#X obj 241 106 cos~;
#X obj 77 227 cpole~;
#X obj 261 65 phasor~;
#X floatatom 261 44 5 0 0 0 - - -;
#X floatatom 132 55 5 0 0 0 - - -;
#X obj 160 107 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 132 105 *~;
#X obj 132 78 phasor~;
#X floatatom 324 42 5 0 0 0 - - -;
#X obj 324 65 / 1000;
#X obj 274 107 -~ 0.25;
#X obj 274 129 cos~;
#X obj 350 131 / 1000;
#X obj 240 157 *~;
#X obj 274 157 *~;
#X obj 94 287 env~ 16384;
#X floatatom 94 311 5 0 0 0 - - -;
#X obj 247 275 dbtorms;
#X floatatom 248 255 5 0 0 0 - - -;
#X connect 0 0 5 0;
#X connect 1 0 0 0;
#X connect 2 0 3 0;
#X connect 4 0 5 1;
#X connect 5 0 12 0;
#X connect 6 0 12 0;
#X connect 7 0 23 0;
#X connect 9 0 8 0;
#X connect 9 0 8 1;
#X connect 11 0 24 0;
#X connect 12 0 2 0;
#X connect 12 0 9 0;
#X connect 12 1 26 0;
#X connect 13 0 21 0;
#X connect 13 0 11 0;
#X connect 14 0 13 0;
#X connect 15 0 18 0;
#X connect 16 0 17 1;
#X connect 17 0 12 0;
#X connect 18 0 17 0;
#X connect 19 0 20 0;
#X connect 20 0 13 1;
#X connect 21 0 22 0;
#X connect 22 0 25 0;
#X connect 23 0 25 1;
#X connect 23 0 24 1;
#X connect 24 0 12 2;
#X connect 25 0 12 3;
#X connect 26 0 27 0;
#X connect 28 0 9 1;
#X connect 29 0 28 0;
#X restore 459 488 pd test;
#X text 10 392 (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://crca.ucsd.edu/~msp/techniques
for an introduction to the necessary theory.);
#X obj 52 7 cpole~;
#X text 114 7 complex one-pole (recursive) filter \, raw;
#X text 132 98 <-- signal to filter (real part);
#X text 130 178 <-- signal to filter (imaginary part);
#X obj 84 177 sig~;
#X obj 115 202 sig~;
#X text 162 204 <-- filter coefficient (real part);
#X obj 145 224 sig~;
#X obj 53 249 cpole~ 0.9 0.4;
#X text 178 250 <-- creation arguments initialize filter;
#X text 206 266 coefficient (real and imaginary part);
#X text 14 283 The action of cpole~ is:;
#X text 11 325 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 text 12 27 Cpole~ filters a complex audio signal (first two inlets)
via a one-pole filter \, whose coefficients are controlled by creation
arguments or by another complex audio signal (remaining two inlets).
;
#X text 171 148 <-- set internal state (real&imaginary parts);
#X msg 64 148 set 0.6 0.8;
#X text 190 226 <-- filter coefficient (imaginary part);
#X text 73 305 y[n] = x[n] + a[n] * y[n-1];
#X obj 97 563 lop~;
#X text 16 563 see also:;
#X obj 96 507 rzero~;
#X obj 36 530 cpole~;
#X obj 36 507 rpole~;
#X obj 156 507 rzero_rev~;
#X obj 96 530 czero~;
#X obj 156 530 czero_rev~;
#X text 255 507 real;
#X text 254 531 complex;
#X text 33 490 1-pole;
#X text 93 490 1-zero;
#X text 143 490 1-zero \, reversed;
#X text 58 474 summary of raw filters:;
#X text 140 563 etc.: user-friendly filters;
#X text 343 583 updated for Pd version 0.43;
#X connect 0 0 14 0;
#X connect 1 0 14 0;
#X connect 10 0 14 1;
#X connect 11 0 14 2;
#X connect 13 0 14 3;
#X connect 21 0 14 0;
