#N canvas 432 38 559 593 10;
#X obj -1 826 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
14 -233017 -33289 0;
#X obj -1 422 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13
-228856 -1 0;
#N canvas 619 316 365 289 META 0;
#X text 10 156 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 10 -42 LICENSE SIBSD;
#X text 10 138 AUTHOR Miller Puckette;
#X text 10 174 RELEASE_DATE 1997;
#X text 10 120 LIBRARY cyclone;
#X text 10 192 HELP_PATCH_AUTHORS Alex Cleveland updated this patch
for Pd-l2ork version 2013.05.28;
#X text 10 -60 KEYWORDS signal filter state variable state-variable
cutoff;
#X text 10 -24 DESCRIPTION state-variable filter;
#X text 10 -6 INLET_0 signal;
#X text 10 12 INLET_1 signal float;
#X text 10 30 INLET_2 signal float;
#X text 10 48 OUTLET_0 signal;
#X text 10 66 OUTLET_1 signal;
#X text 10 84 OUTLET_2 signal;
#X text 10 102 OUTLET_3 signal;
#X restore 499 828 pd META;
#X obj -1 538 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0
13 -228856 -1 0;
#X obj -1 647 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
0 13 -228856 -1 0;
#X obj -1 704 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8
12 0 13 -228856 -1 0;
#N canvas 317 494 428 109 Related_objects 0;
#X obj 0 0 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -204280 -1 0;
#X text 6 1 Related Objects;
#X restore 195 828 pd Related_objects;
#X obj 78 431 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X obj 78 547 cnv 17 3 17 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X obj -1 0 cnv 15 552 40 empty \$0-pddp.cnv.header svf~ 3 12 0 18
-204280 -1 0;
#X obj 491 9 svf~;
#X text 12 24 state-variable filter;
#X obj 78 498 cnv 17 3 33 empty \$0-pddp.cnv.let.0 2 5 9 0 16 -228856
-162280 0;
#X text 106 431 signal;
#X text 178 431 - signal to filter;
#X text 106 497 signal;
#X text 106 515 float;
#X text 106 455 signal;
#X text 106 472 float;
#X text 178 463 - set cutoff frequency;
#X text 178 505 - set resonance (0-1);
#X obj 78 456 cnv 17 3 33 empty \$0-pddp.cnv.let.0 1 5 9 0 16 -228856
-162280 0;
#X obj 78 572 cnv 17 3 17 empty \$0-pddp.cnv.let.0 1 5 9 0 16 -228856
-162280 0;
#X obj 78 595 cnv 17 3 17 empty \$0-pddp.cnv.let.0 2 5 9 0 16 -228856
-162280 0;
#X text 89 658 1) float;
#X text 89 680 2) float;
#X text 106 785 Floats or signals can modify these in real-time. The
value of these parameters is only sampled once per signal vector.;
#X text 106 739 One of its advantages is that the it produces low-pass
\, high-pass \, band-pass \, and band-reject (notch) output simultaneously
- so all four are available in parallel.;
#X text 106 711 svf~ implements Chamberlin's state-variable filter
algorithm.;
#X obj 109 394 dac~;
#N canvas 976 146 556 460 svf_part2 0;
#X text -1 306 onepole~.help contains yet another example.;
#X text -1 382 svf~ accepts arguments or max messages to change the
frequency input mode. it is generally recommended to set the mode with
an argument and leave it constant \, to avoid confusion.;
#X text -1 244 try sweeping the cutoff frequency in linear mode \,
then in radians mode \, to appreciate the difference. a similar principle
operates in the amplitude domain \, where exponential audio faders
are used to match our logarithmic perception of loudness.;
#X text -51 134 linear;
#X text -27 81 Hz;
#X text -1 177 in this mode \, input values from (0 -> 1) are interpreted
as radians \, producing a quarter-cycle sinusoidal mapping to cutoff
frequencies. this conforms the frequency mapping to a response that
is closer to our logarithmic perception of pitch.;
#X text -1 125 this mode is essentially the same \, but with a normalized
input range. linear input values from (0 -> 1) are mapped to cutoff
frequencies in the effective range \, (0 -> fs/4).;
#X text -1 72 this is the default mode. input values set the cutoff
frequency directly. therefore \, the input range is the same as the
cutoff frequency (0 -> fs/4) \, and response is linear.;
#X text -1 9 svf~ has three different modes for mapping input values
onto cutoff frequency. these are mainly for convenience \, but they
may also improve efficiency slightly.;
#X text -1 329 since svf~ only samples its control inputs once per
vector \, it is more efficient to use the radians mode than to do logarithmic
scaling outside the object at audio rate.;
#X text -59 191 radians;
#X restore 432 382 pd svf_part2;
#X msg 298 135 0.5;
#X text 190 83 frequency range is 0 - f(s)/4;
#X obj 108 56 noise~;
#X msg 142 113 37;
#X text 246 314 outputs: lowpass \, highpass \, bandpass \, notch;
#X obj 130 83 loadbang;
#X obj 142 180 * 11025;
#X obj 142 159 / 512;
#X floatatom 142 201 0 0 0 0 - - -;
#N canvas 858 168 716 389 svf_algorithm 0;
#X text 242 290 bandstop = lowpass + hipass \;;
#X text 59 179 this is the dsp loop. note how the calculations work
together to produce all four outputs simultaneously.;
#X text 62 123 first \, convert hz to radians (this step is not necessary
in radians input mode);
#X text 44 82 this is the basic algorithm inside svf~:;
#X text 237 137 cf_radians = sin(2. * PI * cf_hz * x->ifs) \;;
#X text 242 258 bandpass = bandpass + cf_radians * hipass \;;
#X text 242 242 hipass = in_samp - lowpass - q * bandpass \;;
#X text 242 226 lowpass = lowpass + (cf_radians * bandpass) \;;
#X text 242 274 bandpass = bandpass - (bandpass ^ 3.) * 0.0001 \;;
#X restore 314 382 pd svf_algorithm;
#X obj 230 288 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 195 288 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 163 288 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 130 288 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 209 314 *~ 0;
#X obj 174 314 *~ 0;
#X obj 142 314 *~ 0;
#X obj 109 314 *~ 0;
#X floatatom 177 226 0 0 0 0 - - -;
#X obj 108 251 svf~ 797 0.5;
#X obj 108 361 *~ 0.7;
#X obj 142 137 hsl 128 15 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 3700 1;
#X text 106 547 signal;
#X text 178 547 - lowpass signal;
#X text 106 572 signal;
#X text 178 572 - highpass signal;
#X text 106 595 signal;
#X text 178 595 - bandpass signal;
#X obj 78 620 cnv 17 3 17 empty \$0-pddp.cnv.let.0 3 5 9 0 16 -228856
-162280 0;
#X text 106 620 signal;
#X text 178 620 - notch signal;
#X obj 480 54 pddp/dsp;
#X text 178 655 - initial cutoff frequency (Hz);
#X text 178 679 - initial resonance (0-1);
#X obj 12 829 pddp/pddplink @pd_help/all_about_help_patches.pd -text Usage Guide
;
#X connect 31 0 49 0;
#X connect 33 0 50 0;
#X connect 34 0 52 0;
#X connect 36 0 31 0;
#X connect 36 0 34 0;
#X connect 36 0 44 0;
#X connect 37 0 39 0;
#X connect 38 0 37 0;
#X connect 39 0 50 1;
#X connect 41 0 45 1;
#X connect 42 0 46 1;
#X connect 43 0 47 1;
#X connect 44 0 48 1;
#X connect 45 0 51 0;
#X connect 46 0 51 0;
#X connect 47 0 51 0;
#X connect 48 0 51 0;
#X connect 49 0 50 2;
#X connect 50 0 48 0;
#X connect 50 1 47 0;
#X connect 50 2 46 0;
#X connect 50 3 45 0;
#X connect 51 0 29 0;
#X connect 51 0 29 1;
#X connect 52 0 38 0;
