[PD] 2 pole lpf with resonance?

Frank Barknecht fbar at footils.org
Wed Feb 14 23:39:39 CET 2007


Hallo,
Roman Haefeli hat gesagt: // Roman Haefeli wrote:

> On Wed, 2007-02-14 at 10:22 +0100, Frank Barknecht wrote:
> 
> > However [biquad~] doesn't have audio inputs to set the coeffs.
> > Alternatively you could use the elementary filters [rpole~], [rzero~]
> > etc. They accept signals for their parameters. Maybe I should sit down
> > and build a 2plp now ...
> 
> yes, please do so!... ;-)

Attached is not the real thing, but a funny one anyways, and it's very
simple, basically only a variation of this:
http://crca.ucsd.edu/~msp/techniques/latest/book-html/node160.html
and this:
http://crca.ucsd.edu/~msp/techniques/latest/book-html/node138.html
to use signal inputs and frequencies instead of angles.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 205 172 788 574 10;
#X obj 179 87 noise~;
#X msg 86 141 clear;
#X obj 581 141 table \$0-impulse 64;
#X obj 272 107 tabplay~ \$0-impulse;
#X obj 582 112 s \$0-impulse;
#X obj 272 54 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 582 66 loadbang;
#X obj 178 123 *~ 1;
#X obj 212 126 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X msg 582 89 const 0 \, 32 1;
#X obj 179 415 *~ 0;
#X obj 219 436 dbtorms;
#X obj 222 417 hsl 64 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 179 441 dac~;
#N canvas 396 128 677 634 spectrum 0;
#N canvas 529 231 558 569 fft 0;
#X obj 19 62 inlet~;
#X obj 85 214 inlet;
#X obj 19 92 rfft~;
#X obj 19 125 *~;
#X obj 50 125 *~;
#X obj 19 155 sqrt~;
#X obj 332 109 block~ 4096 1;
#X obj 19 181 biquad~ 0 0 0 0 1;
#X text 83 93 Fourier series;
#X text 88 146 magnitude;
#X text 86 131 calculate;
#X text 21 3 This subpatch computes the spectrum of the incoming signal
with a (rectangular windowed) FFT. FFTs aren't properly introduced
until much later.;
#X text 83 62 signal to analyze;
#X text 182 166 delay two samples;
#X text 181 182 for better graphing;
#X text 135 216 "bang" into this inlet to graph it;
#X obj 85 288 tabwrite~ \$0-spectrum;
#X obj 19 213 /~ 4096;
#X obj 19 235 rmstodb~;
#X connect 0 0 2 0;
#X connect 1 0 16 0;
#X connect 2 0 3 0;
#X connect 2 0 3 1;
#X connect 2 1 4 0;
#X connect 2 1 4 1;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 7 0;
#X connect 7 0 17 0;
#X connect 17 0 18 0;
#X connect 18 0 16 0;
#X restore 48 377 pd fft;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-spectrum 2048 float 0;
#X coords 0 100 2047 0 259 140 1;
#X restore 134 130 graph;
#X obj 108 182 bng 15 250 50 0 \$0-plot empty plot 0 -6 0 8 -262144
-1 -1;
#X obj 107 215 tgl 15 0 \$0-auto empty auto 0 -6 0 8 -262144 -1 -1
0 1;
#X obj 85 329 r \$0-plot;
#X obj 133 349 r \$0-auto;
#X obj 133 372 metro 500;
#X obj 48 44 inlet~;
#X obj 444 170 inlet;
#X obj 444 192 b;
#X obj 444 217 s \$0-plot;
#X obj 48 323 *~ 1;
#X floatatom 134 278 5 50 1000 1 upd-freq - -;
#X obj 230 309 loadbang;
#X msg 230 334 100;
#X connect 4 0 0 1;
#X connect 5 0 6 0;
#X connect 6 0 0 1;
#X connect 7 0 11 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 11 0 0 0;
#X connect 12 0 6 1;
#X connect 13 0 14 0;
#X connect 14 0 12 0;
#X coords 0 -1 1 1 300 200 1 100 100;
#X restore 303 352 pd spectrum;
#X obj 417 126 vline~;
#X obj 411 217 vline~;
#X obj 179 274 resopoles~;
#X obj 417 150 +~ 2500;
#X text 67 40 Careful: May get LOUD!;
#X msg 417 103 8000 \, 5000 400;
#X msg 411 186 0.999 10 \, 0.995 3000 10;
#X obj 272 274 resopoles~;
#X connect 0 0 7 0;
#X connect 1 0 17 0;
#X connect 1 0 22 0;
#X connect 3 0 17 0;
#X connect 3 0 22 0;
#X connect 5 0 3 0;
#X connect 5 0 21 0;
#X connect 5 0 20 0;
#X connect 6 0 9 0;
#X connect 7 0 17 0;
#X connect 7 0 22 0;
#X connect 8 0 7 1;
#X connect 9 0 4 0;
#X connect 10 0 13 0;
#X connect 10 0 13 1;
#X connect 11 0 10 1;
#X connect 12 0 11 0;
#X connect 15 0 17 1;
#X connect 15 0 18 0;
#X connect 16 0 17 2;
#X connect 16 0 22 2;
#X connect 17 0 10 0;
#X connect 17 0 14 0;
#X connect 18 0 22 1;
#X connect 20 0 15 0;
#X connect 21 0 16 0;
#X connect 22 0 10 0;
#X connect 22 0 14 0;
-------------- next part --------------
#N canvas 340 256 395 569 10;
#X obj 37 70 inlet~;
#X obj 111 70 inlet~;
#X obj 36 523 outlet~;
#X obj 74 502 outlet~;
#X obj 36 481 cpole~;
#X obj 163 147 samplerate~;
#X obj 227 424 *~;
#X obj 185 424 *~;
#X obj 112 171 /~ 44100;
#X obj 159 235 +~ 0.25;
#X obj 158 263 cos~;
#X obj 113 264 cos~;
#X obj 163 125 loadbang;
#X obj 287 73 inlet~;
#X connect 0 0 4 0;
#X connect 1 0 8 0;
#X connect 4 0 2 0;
#X connect 4 1 3 0;
#X connect 5 0 8 1;
#X connect 6 0 4 3;
#X connect 7 0 4 2;
#X connect 8 0 11 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 10 0 6 0;
#X connect 11 0 7 0;
#X connect 12 0 5 0;
#X connect 13 0 7 1;
#X connect 13 0 6 1;
#X coords 0 0 1 1 85 60 0;


More information about the Pd-list mailing list