diff options
Diffstat (limited to 'biquad')
-rw-r--r-- | biquad/bq_coef_bp-help.pd | 113 | ||||
-rw-r--r-- | biquad/bq_coef_bp.pd | 84 | ||||
-rw-r--r-- | biquad/bq_coef_highshelf-help.pd | 113 | ||||
-rw-r--r-- | biquad/bq_coef_highshelf.pd | 100 | ||||
-rw-r--r-- | biquad/bq_coef_hip-help.pd | 113 | ||||
-rw-r--r-- | biquad/bq_coef_hip.pd | 104 | ||||
-rw-r--r-- | biquad/bq_coef_lop-help.pd | 113 | ||||
-rw-r--r-- | biquad/bq_coef_lop.pd | 104 | ||||
-rw-r--r-- | biquad/bq_coef_lowshelf-help.pd | 113 | ||||
-rw-r--r-- | biquad/bq_coef_lowshelf.pd | 105 | ||||
-rw-r--r-- | biquad/bq_coef_notch-help.pd | 113 | ||||
-rw-r--r-- | biquad/bq_coef_notch.pd | 86 | ||||
-rw-r--r-- | biquad/bq_coef_peak-help.pd | 116 | ||||
-rw-r--r-- | biquad/bq_coef_peak.pd | 113 | ||||
-rw-r--r-- | biquad/bq~-help.pd | 927 | ||||
-rw-r--r-- | biquad/bq~.c | 112 | ||||
-rwxr-xr-x | biquad/makefile | 97 |
17 files changed, 2626 insertions, 0 deletions
diff --git a/biquad/bq_coef_bp-help.pd b/biquad/bq_coef_bp-help.pd new file mode 100644 index 0000000..880781a --- /dev/null +++ b/biquad/bq_coef_bp-help.pd @@ -0,0 +1,113 @@ +#N canvas 544 74 484 505 10; +#X obj 29 160 hip~ 2; +#X msg 39 187 clear; +#X obj 156 140 pack f f f f f; +#X obj 156 94 mtof; +#X floatatom 156 77 5 0 0 0 - - -; +#X floatatom 219 98 5 0 0 0 - - -; +#X obj 29 132 noise~; +#N canvas 0 0 450 300 5_line~ 0; +#X obj 80 123 line~; +#X obj 79 147 outlet~; +#X obj 80 73 inlet; +#X obj 136 123 line~; +#X obj 135 147 outlet~; +#X obj 136 73 inlet; +#X obj 193 123 line~; +#X obj 192 147 outlet~; +#X obj 193 73 inlet; +#X obj 247 123 line~; +#X obj 246 147 outlet~; +#X obj 247 73 inlet; +#X obj 304 123 line~; +#X obj 303 147 outlet~; +#X obj 304 73 inlet; +#X msg 80 96 \$1 133; +#X msg 136 96 \$1 133; +#X msg 193 96 \$1 133; +#X msg 247 96 \$1 133; +#X msg 304 96 \$1 133; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 3 0 4 0; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 12 0 13 0; +#X connect 14 0 19 0; +#X connect 15 0 0 0; +#X connect 16 0 3 0; +#X connect 17 0 6 0; +#X connect 18 0 9 0; +#X connect 19 0 12 0; +#X restore 45 258 pd 5_line~; +#X obj 45 231 unpack f f f f f; +#X obj 43 328 dac~; +#X obj 156 166 t a; +#X obj 44 301 *~ 0.1; +#N canvas 0 0 444 301 oscillo 0; +#X obj 41 25 loadbang; +#X obj 26 223 metro 100; +#X obj 8 -9 inlet~; +#X msg 41 47 1; +#X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; +#X obj 118 -3 inlet; +#X msg 147 48 1; +#X msg 115 48 0; +#X obj 118 21 moses 10; +#X obj 19 263 tabwrite~ \$0-oscillo; +#X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 0 0 767 419 (subpatch) 0; +#X array \$0-oscillo 300 float 0; +#X coords 0 1 299 -1 300 80 1; +#X restore 100 100 graph; +#X obj 110 75 change; +#X obj 234 62 block~ 640 1 0.25; +#X connect 0 0 3 0; +#X connect 1 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 8 1 1 1; +#X connect 12 0 1 0; +#X coords 0 -1 1 1 300 80 1 100 100; +#X restore 29 372 pd oscillo; +#X text 260 95 Q; +#X text 192 77 cutoff; +#X obj 156 116 bq_coef_bp; +#X text 153 8 band pass filter coeficient for a biquad; +#X obj 29 280 bq~ --------; +#X connect 0 0 17 0; +#X connect 1 0 17 0; +#X connect 2 0 10 0; +#X connect 3 0 15 0; +#X connect 4 0 3 0; +#X connect 5 0 15 1; +#X connect 6 0 0 0; +#X connect 7 0 17 1; +#X connect 7 1 17 2; +#X connect 7 2 17 3; +#X connect 7 3 17 4; +#X connect 7 4 17 5; +#X connect 8 0 7 0; +#X connect 8 1 7 1; +#X connect 8 2 7 2; +#X connect 8 3 7 3; +#X connect 8 4 7 4; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 15 0 2 0; +#X connect 15 1 2 1; +#X connect 15 2 2 2; +#X connect 15 3 2 3; +#X connect 15 4 2 4; +#X connect 17 0 11 0; +#X connect 17 0 12 0; diff --git a/biquad/bq_coef_bp.pd b/biquad/bq_coef_bp.pd new file mode 100644 index 0000000..e870cff --- /dev/null +++ b/biquad/bq_coef_bp.pd @@ -0,0 +1,84 @@ +#N canvas 0 0 417 599 10; +#X obj 50 32 inlet; +#X obj 211 31 inlet; +#X text 92 34 f; +#X text 256 31 Q; +#X obj 119 148 samplerate~; +#X obj 119 125 loadbang; +#X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 180 /; +#X obj 50 349 cos; +#X obj 199 276 sin; +#X obj 211 126 * 2; +#X obj 50 544 outlet; +#X obj 288 484 + 1; +#X obj 50 467 * -2; +#X obj 50 249 t f f; +#X obj 50 519 /; +#X obj 94 520 /; +#X obj 139 520 /; +#X obj 229 520 /; +#X obj 139 544 outlet; +#X obj 94 544 outlet; +#X obj 184 544 outlet; +#X obj 229 544 outlet; +#X obj 50 226 f; +#X obj 211 195 t b f; +#X msg 94 438 1 \$1; +#X obj 94 483 -; +#X obj 229 481 * -1; +#X msg 184 520 0; +#X obj 199 330 t f b f; +#X obj 211 74 max 0; +#X obj 50 73 max 0; +#X obj 50 122 * 3.14159; +#X obj 211 105 + 0.7; +#X msg 211 148 1 \$1; +#X obj 238 242 sinh; +#X obj 211 170 /; +#X obj 50 148 * 2; +#X obj 50 99 min 21000; +#X obj 199 303 * 0.767; +#X connect 0 0 31 0; +#X connect 1 0 30 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 23 0; +#X connect 8 0 13 0; +#X connect 9 0 39 0; +#X connect 10 0 34 0; +#X connect 12 0 15 1; +#X connect 12 0 16 1; +#X connect 12 0 17 1; +#X connect 12 0 18 1; +#X connect 13 0 15 0; +#X connect 14 0 8 0; +#X connect 14 1 9 0; +#X connect 15 0 11 0; +#X connect 16 0 20 0; +#X connect 17 0 19 0; +#X connect 18 0 22 0; +#X connect 23 0 14 0; +#X connect 24 0 23 0; +#X connect 24 1 35 0; +#X connect 25 0 26 0; +#X connect 26 0 16 0; +#X connect 27 0 18 0; +#X connect 28 0 21 0; +#X connect 29 0 25 0; +#X connect 29 0 17 0; +#X connect 29 0 27 0; +#X connect 29 1 28 0; +#X connect 29 2 12 0; +#X connect 30 0 33 0; +#X connect 31 0 38 0; +#X connect 32 0 37 0; +#X connect 33 0 10 0; +#X connect 34 0 36 0; +#X connect 35 0 39 1; +#X connect 36 0 24 0; +#X connect 37 0 7 0; +#X connect 38 0 32 0; +#X connect 39 0 29 0; diff --git a/biquad/bq_coef_highshelf-help.pd b/biquad/bq_coef_highshelf-help.pd new file mode 100644 index 0000000..e8286ad --- /dev/null +++ b/biquad/bq_coef_highshelf-help.pd @@ -0,0 +1,113 @@ +#N canvas 143 113 484 505 10; +#X obj 29 160 hip~ 2; +#X msg 39 189 clear; +#X obj 156 140 pack f f f f f; +#X obj 156 94 mtof; +#X floatatom 156 77 5 0 0 0 - - -; +#X floatatom 219 98 5 0 0 0 - - -; +#X obj 29 132 noise~; +#N canvas 0 0 450 300 5_line~ 0; +#X obj 80 123 line~; +#X obj 79 147 outlet~; +#X obj 80 73 inlet; +#X obj 136 123 line~; +#X obj 135 147 outlet~; +#X obj 136 73 inlet; +#X obj 193 123 line~; +#X obj 192 147 outlet~; +#X obj 193 73 inlet; +#X obj 247 123 line~; +#X obj 246 147 outlet~; +#X obj 247 73 inlet; +#X obj 304 123 line~; +#X obj 303 147 outlet~; +#X obj 304 73 inlet; +#X msg 80 96 \$1 133; +#X msg 136 96 \$1 133; +#X msg 193 96 \$1 133; +#X msg 247 96 \$1 133; +#X msg 304 96 \$1 133; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 3 0 4 0; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 12 0 13 0; +#X connect 14 0 19 0; +#X connect 15 0 0 0; +#X connect 16 0 3 0; +#X connect 17 0 6 0; +#X connect 18 0 9 0; +#X connect 19 0 12 0; +#X restore 45 258 pd 5_line~; +#X obj 45 231 unpack f f f f f; +#X obj 43 328 dac~; +#X obj 156 166 t a; +#X obj 44 301 *~ 0.1; +#N canvas 0 0 444 301 oscillo 0; +#X obj 41 25 loadbang; +#X obj 26 223 metro 100; +#X obj 8 -9 inlet~; +#X msg 41 47 1; +#X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; +#X obj 118 -3 inlet; +#X msg 147 48 1; +#X msg 115 48 0; +#X obj 118 21 moses 10; +#X obj 19 263 tabwrite~ \$0-oscillo; +#X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 0 0 767 419 (subpatch) 0; +#X array \$0-oscillo 300 float 0; +#X coords 0 1 299 -1 300 80 1; +#X restore 100 100 graph; +#X obj 110 75 change; +#X obj 234 62 block~ 640 1 0.25; +#X connect 0 0 3 0; +#X connect 1 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 8 1 1 1; +#X connect 12 0 1 0; +#X coords 0 -1 1 1 300 80 1 100 100; +#X restore 29 372 pd oscillo; +#X text 192 77 cutoff; +#X text 153 8 high shelf filter coeficient for a biquad; +#X obj 156 116 bq_coef_highshelf; +#X text 260 95 gain; +#X obj 29 280 bq~ --------; +#X connect 0 0 17 0; +#X connect 1 0 17 0; +#X connect 2 0 10 0; +#X connect 3 0 15 0; +#X connect 4 0 3 0; +#X connect 5 0 15 1; +#X connect 6 0 0 0; +#X connect 7 0 17 1; +#X connect 7 1 17 2; +#X connect 7 2 17 3; +#X connect 7 3 17 4; +#X connect 7 4 17 5; +#X connect 8 0 7 0; +#X connect 8 1 7 1; +#X connect 8 2 7 2; +#X connect 8 3 7 3; +#X connect 8 4 7 4; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 15 0 2 0; +#X connect 15 1 2 1; +#X connect 15 2 2 2; +#X connect 15 3 2 3; +#X connect 15 4 2 4; +#X connect 17 0 11 0; +#X connect 17 0 12 0; diff --git a/biquad/bq_coef_highshelf.pd b/biquad/bq_coef_highshelf.pd new file mode 100644 index 0000000..52e1132 --- /dev/null +++ b/biquad/bq_coef_highshelf.pd @@ -0,0 +1,100 @@ +#N canvas 0 0 511 569 10; +#X obj 50 32 inlet; +#X text 92 34 f; +#X obj 50 165 * 6.283; +#X obj 106 188 samplerate~; +#X obj 106 166 loadbang; +#X obj 164 167 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 220 /; +#X obj 96 272 cos; +#X obj 69 271 sin; +#X obj 319 36 inlet; +#X text 387 146 A; +#X obj 319 121 pow; +#X msg 319 100 10; +#X obj 319 81 t b f; +#X obj 319 58 / 40; +#X obj 319 182 t f f; +#X obj 319 204 *; +#X obj 319 224 + 1; +#X obj 360 183 - 1; +#X obj 360 204 t f f; +#X obj 360 226 *; +#X obj 319 254 -; +#X text 360 279 beta; +#X obj 319 278 sqrt; +#X obj 319 143 t f f f; +#X obj 50 243 t b f f; +#X obj 50 493 /; +#X obj 50 525 outlet; +#X obj 99 527 outlet; +#X obj 149 528 outlet; +#X obj 199 528 outlet; +#X obj 249 529 outlet; +#X obj 99 493 /; +#X obj 149 496 /; +#X obj 199 494 /; +#X obj 249 497 /; +#X obj 50 392 expr 2 * ( ($f2-1) - ($f2+1)*$f4 ) \; ($f2+1) - ($f2-1)*$f4 +- $f1*$f3 \; $f2 * ( ($f2+1) + ($f2-1)*$f4 + $f1*$f3 ) \; -2 * $f2 +* ( ($f2-1) + ($f2+1)*$f4 ) \; $f2 * ( ($f2+1) + ($f2-1)*$f4 - $f1*$f3 +) \; ($f2+1) - ($f2-1)*$f4 + $f1*$f3 \;; +#X obj 50 73 max 0; +#X obj 50 99 min 21000; +#X obj 50 357 f; +#X msg 135 281 1; +#X obj 135 302 sqrt; +#X obj 135 257 loadbang; +#X connect 0 0 37 0; +#X connect 2 0 6 0; +#X connect 3 0 6 1; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 6 0 25 0; +#X connect 7 0 36 3; +#X connect 8 0 36 2; +#X connect 9 0 14 0; +#X connect 11 0 24 0; +#X connect 12 0 11 0; +#X connect 13 0 12 0; +#X connect 13 1 11 1; +#X connect 14 0 13 0; +#X connect 15 0 16 0; +#X connect 15 1 16 1; +#X connect 16 0 17 0; +#X connect 17 0 21 0; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 19 1 20 1; +#X connect 20 0 21 1; +#X connect 21 0 23 0; +#X connect 23 0 36 0; +#X connect 24 0 15 0; +#X connect 24 1 18 0; +#X connect 24 2 36 1; +#X connect 25 0 39 0; +#X connect 25 1 8 0; +#X connect 25 2 7 0; +#X connect 26 0 27 0; +#X connect 32 0 28 0; +#X connect 33 0 29 0; +#X connect 34 0 30 0; +#X connect 35 0 31 0; +#X connect 36 0 26 0; +#X connect 36 1 32 0; +#X connect 36 2 33 0; +#X connect 36 3 34 0; +#X connect 36 4 35 0; +#X connect 36 5 26 1; +#X connect 36 5 32 1; +#X connect 36 5 33 1; +#X connect 36 5 34 1; +#X connect 36 5 35 1; +#X connect 37 0 38 0; +#X connect 38 0 2 0; +#X connect 39 0 36 0; +#X connect 40 0 41 0; +#X connect 40 0 36 1; +#X connect 41 0 39 1; +#X connect 42 0 40 0; diff --git a/biquad/bq_coef_hip-help.pd b/biquad/bq_coef_hip-help.pd new file mode 100644 index 0000000..2e0ddb5 --- /dev/null +++ b/biquad/bq_coef_hip-help.pd @@ -0,0 +1,113 @@ +#N canvas 544 74 484 505 10; +#X obj 29 160 hip~ 2; +#X msg 40 187 clear; +#X obj 156 140 pack f f f f f; +#X obj 156 94 mtof; +#X floatatom 156 77 5 0 0 0 - - -; +#X floatatom 219 98 5 0 0 0 - - -; +#X obj 29 132 noise~; +#N canvas 0 0 450 300 5_line~ 0; +#X obj 80 123 line~; +#X obj 79 147 outlet~; +#X obj 80 73 inlet; +#X obj 136 123 line~; +#X obj 135 147 outlet~; +#X obj 136 73 inlet; +#X obj 193 123 line~; +#X obj 192 147 outlet~; +#X obj 193 73 inlet; +#X obj 247 123 line~; +#X obj 246 147 outlet~; +#X obj 247 73 inlet; +#X obj 304 123 line~; +#X obj 303 147 outlet~; +#X obj 304 73 inlet; +#X msg 80 96 \$1 133; +#X msg 136 96 \$1 133; +#X msg 193 96 \$1 133; +#X msg 247 96 \$1 133; +#X msg 304 96 \$1 133; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 3 0 4 0; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 12 0 13 0; +#X connect 14 0 19 0; +#X connect 15 0 0 0; +#X connect 16 0 3 0; +#X connect 17 0 6 0; +#X connect 18 0 9 0; +#X connect 19 0 12 0; +#X restore 45 258 pd 5_line~; +#X obj 45 231 unpack f f f f f; +#X obj 43 328 dac~; +#X obj 156 166 t a; +#X obj 44 301 *~ 0.1; +#N canvas 0 0 444 301 oscillo 0; +#X obj 41 25 loadbang; +#X obj 26 223 metro 100; +#X obj 8 -9 inlet~; +#X msg 41 47 1; +#X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; +#X obj 118 -3 inlet; +#X msg 147 48 1; +#X msg 115 48 0; +#X obj 118 21 moses 10; +#X obj 19 263 tabwrite~ \$0-oscillo; +#X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 0 0 767 419 (subpatch) 0; +#X array \$0-oscillo 300 float 0; +#X coords 0 1 299 -1 300 80 1; +#X restore 100 100 graph; +#X obj 110 75 change; +#X obj 234 62 block~ 640 1 0.25; +#X connect 0 0 3 0; +#X connect 1 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 8 1 1 1; +#X connect 12 0 1 0; +#X coords 0 -1 1 1 300 80 1 100 100; +#X restore 29 372 pd oscillo; +#X text 260 95 Q; +#X text 192 77 cutoff; +#X obj 156 116 bq_coef_hip; +#X text 153 8 high pass filter coeficient for a biquad; +#X obj 29 280 bq~ --------; +#X connect 0 0 17 0; +#X connect 1 0 17 0; +#X connect 2 0 10 0; +#X connect 3 0 15 0; +#X connect 4 0 3 0; +#X connect 5 0 15 1; +#X connect 6 0 0 0; +#X connect 7 0 17 1; +#X connect 7 1 17 2; +#X connect 7 2 17 3; +#X connect 7 3 17 4; +#X connect 7 4 17 5; +#X connect 8 0 7 0; +#X connect 8 1 7 1; +#X connect 8 2 7 2; +#X connect 8 3 7 3; +#X connect 8 4 7 4; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 15 0 2 0; +#X connect 15 1 2 1; +#X connect 15 2 2 2; +#X connect 15 3 2 3; +#X connect 15 4 2 4; +#X connect 17 0 11 0; +#X connect 17 0 12 0; diff --git a/biquad/bq_coef_hip.pd b/biquad/bq_coef_hip.pd new file mode 100644 index 0000000..a3f578f --- /dev/null +++ b/biquad/bq_coef_hip.pd @@ -0,0 +1,104 @@ +#N canvas 0 0 360 583 10; +#X obj 50 32 inlet; +#X obj 211 31 inlet; +#X text 92 34 f; +#X text 256 31 Q; +#X obj 116 138 samplerate~; +#X obj 116 115 loadbang; +#X obj 173 116 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 170 /; +#X obj 50 339 cos; +#X obj 199 266 sin; +#X obj 211 116 * 2; +#X obj 50 534 outlet; +#X obj 288 474 + 1; +#X obj 139 471 / 2; +#X msg 139 428 1 \$1; +#X obj 184 450 -; +#X obj 229 471 / 2; +#X msg 229 428 1 \$1; +#X obj 50 457 * -2; +#X obj 50 239 t f f; +#X obj 50 509 /; +#X obj 94 510 /; +#X obj 139 510 /; +#X obj 184 509 /; +#X obj 229 510 /; +#X obj 139 534 outlet; +#X obj 94 534 outlet; +#X obj 184 534 outlet; +#X obj 229 534 outlet; +#X obj 50 216 f; +#X obj 211 185 t b f; +#X obj 211 95 + 0.707; +#X msg 94 428 1 \$1; +#X obj 94 473 -; +#X obj 199 320 t f f; +#X obj 139 450 +; +#X obj 229 451 +; +#X msg 184 428 -1 \$1; +#X obj 211 74 max 0; +#X obj 50 73 max 0; +#X obj 50 364 t f f b; +#X obj 50 115 * 3.14159; +#X obj 60 193 min 3.14; +#X obj 199 294 * 0.767; +#X obj 238 254 sinh; +#X msg 211 140 1 \$1; +#X obj 211 162 /; +#X obj 50 144 * 2; +#X obj 50 95 min 21000; +#X connect 0 0 39 0; +#X connect 1 0 38 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 29 0; +#X connect 8 0 40 0; +#X connect 9 0 43 0; +#X connect 10 0 45 0; +#X connect 12 0 20 1; +#X connect 12 0 21 1; +#X connect 12 0 22 1; +#X connect 12 0 23 1; +#X connect 12 0 24 1; +#X connect 13 0 22 0; +#X connect 14 0 35 0; +#X connect 15 0 23 0; +#X connect 16 0 24 0; +#X connect 17 0 36 0; +#X connect 18 0 20 0; +#X connect 19 0 8 0; +#X connect 19 1 9 0; +#X connect 20 0 11 0; +#X connect 21 0 26 0; +#X connect 22 0 25 0; +#X connect 23 0 27 0; +#X connect 24 0 28 0; +#X connect 29 0 19 0; +#X connect 30 0 29 0; +#X connect 30 1 44 0; +#X connect 31 0 10 0; +#X connect 32 0 33 0; +#X connect 33 0 21 0; +#X connect 34 0 32 0; +#X connect 34 1 12 0; +#X connect 35 0 13 0; +#X connect 36 0 16 0; +#X connect 37 0 15 0; +#X connect 38 0 31 0; +#X connect 39 0 48 0; +#X connect 40 0 18 0; +#X connect 40 1 14 0; +#X connect 40 1 37 0; +#X connect 40 1 17 0; +#X connect 40 2 33 0; +#X connect 41 0 47 0; +#X connect 42 0 29 0; +#X connect 43 0 34 0; +#X connect 44 0 43 1; +#X connect 45 0 46 0; +#X connect 46 0 30 0; +#X connect 47 0 7 0; +#X connect 48 0 41 0; diff --git a/biquad/bq_coef_lop-help.pd b/biquad/bq_coef_lop-help.pd new file mode 100644 index 0000000..2e0fa85 --- /dev/null +++ b/biquad/bq_coef_lop-help.pd @@ -0,0 +1,113 @@ +#N canvas 544 74 484 505 10; +#X obj 29 160 hip~ 2; +#X msg 42 190 clear; +#X obj 156 140 pack f f f f f; +#X obj 156 94 mtof; +#X floatatom 156 77 5 0 0 0 - - -; +#X floatatom 219 98 5 0 0 0 - - -; +#X obj 29 132 noise~; +#N canvas 0 0 450 300 5_line~ 0; +#X obj 80 123 line~; +#X obj 79 147 outlet~; +#X obj 80 73 inlet; +#X obj 136 123 line~; +#X obj 135 147 outlet~; +#X obj 136 73 inlet; +#X obj 193 123 line~; +#X obj 192 147 outlet~; +#X obj 193 73 inlet; +#X obj 247 123 line~; +#X obj 246 147 outlet~; +#X obj 247 73 inlet; +#X obj 304 123 line~; +#X obj 303 147 outlet~; +#X obj 304 73 inlet; +#X msg 80 96 \$1 133; +#X msg 136 96 \$1 133; +#X msg 193 96 \$1 133; +#X msg 247 96 \$1 133; +#X msg 304 96 \$1 133; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 3 0 4 0; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 12 0 13 0; +#X connect 14 0 19 0; +#X connect 15 0 0 0; +#X connect 16 0 3 0; +#X connect 17 0 6 0; +#X connect 18 0 9 0; +#X connect 19 0 12 0; +#X restore 45 258 pd 5_line~; +#X obj 45 231 unpack f f f f f; +#X obj 43 328 dac~; +#X obj 156 166 t a; +#X obj 44 301 *~ 0.1; +#X obj 156 116 bq_coef_lop; +#N canvas 0 0 444 301 oscillo 0; +#X obj 41 25 loadbang; +#X obj 26 223 metro 100; +#X obj 8 -9 inlet~; +#X msg 41 47 1; +#X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; +#X obj 118 -3 inlet; +#X msg 147 48 1; +#X msg 115 48 0; +#X obj 118 21 moses 10; +#X obj 19 263 tabwrite~ \$0-oscillo; +#X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 0 0 767 419 (subpatch) 0; +#X array \$0-oscillo 300 float 0; +#X coords 0 1 299 -1 300 80 1; +#X restore 100 100 graph; +#X obj 110 75 change; +#X obj 234 62 block~ 640 1 0.25; +#X connect 0 0 3 0; +#X connect 1 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 8 1 1 1; +#X connect 12 0 1 0; +#X coords 0 -1 1 1 300 80 1 100 100; +#X restore 29 372 pd oscillo; +#X text 153 8 low pass filter coeficient for a biquad; +#X text 260 95 Q; +#X text 192 77 cutoff; +#X obj 29 280 bq~ --------; +#X connect 0 0 17 0; +#X connect 1 0 17 0; +#X connect 2 0 10 0; +#X connect 3 0 12 0; +#X connect 4 0 3 0; +#X connect 5 0 12 1; +#X connect 6 0 0 0; +#X connect 7 0 17 1; +#X connect 7 1 17 2; +#X connect 7 2 17 3; +#X connect 7 3 17 4; +#X connect 7 4 17 5; +#X connect 8 0 7 0; +#X connect 8 1 7 1; +#X connect 8 2 7 2; +#X connect 8 3 7 3; +#X connect 8 4 7 4; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 12 0 2 0; +#X connect 12 1 2 1; +#X connect 12 2 2 2; +#X connect 12 3 2 3; +#X connect 12 4 2 4; +#X connect 17 0 11 0; +#X connect 17 0 13 0; diff --git a/biquad/bq_coef_lop.pd b/biquad/bq_coef_lop.pd new file mode 100644 index 0000000..5f25d20 --- /dev/null +++ b/biquad/bq_coef_lop.pd @@ -0,0 +1,104 @@ +#N canvas 0 0 454 630 10; +#X obj 50 32 inlet; +#X obj 211 31 inlet; +#X text 92 34 f; +#X text 256 31 Q; +#X obj 117 137 samplerate~; +#X obj 117 114 loadbang; +#X obj 174 115 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 170 /; +#X obj 50 369 cos; +#X obj 199 296 sin; +#X obj 211 116 * 2; +#X obj 50 564 outlet; +#X obj 288 504 + 1; +#X obj 139 501 / 2; +#X obj 94 505 -; +#X msg 99 463 1 \$1; +#X msg 139 458 1 \$1; +#X obj 184 480 -; +#X obj 229 501 / 2; +#X msg 229 460 1 \$1; +#X obj 50 487 * -2; +#X obj 139 480 -; +#X msg 184 458 1 \$1; +#X obj 229 481 -; +#X obj 199 350 t f f; +#X obj 50 269 t f f; +#X obj 50 539 /; +#X obj 94 540 /; +#X obj 139 540 /; +#X obj 184 539 /; +#X obj 229 540 /; +#X obj 139 564 outlet; +#X obj 94 564 outlet; +#X obj 184 564 outlet; +#X obj 229 564 outlet; +#X obj 50 246 f; +#X obj 211 185 t b f; +#X obj 211 95 + 0.707; +#X obj 211 74 max 0; +#X obj 50 73 max 0; +#X obj 50 394 t f f b; +#X obj 50 115 * 3.14159; +#X obj 67 206 min 3.14; +#X obj 238 295 sinh; +#X obj 199 325 * 0.767; +#X msg 211 140 1 \$1; +#X obj 211 162 /; +#X obj 50 143 * 2; +#X obj 50 95 min 21000; +#X connect 0 0 39 0; +#X connect 1 0 38 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 35 0; +#X connect 8 0 40 0; +#X connect 9 0 44 0; +#X connect 10 0 45 0; +#X connect 12 0 26 1; +#X connect 12 0 27 1; +#X connect 12 0 28 1; +#X connect 12 0 29 1; +#X connect 12 0 30 1; +#X connect 13 0 28 0; +#X connect 14 0 27 0; +#X connect 15 0 14 0; +#X connect 16 0 21 0; +#X connect 17 0 29 0; +#X connect 18 0 30 0; +#X connect 19 0 23 0; +#X connect 20 0 26 0; +#X connect 21 0 13 0; +#X connect 22 0 17 0; +#X connect 23 0 18 0; +#X connect 24 0 15 0; +#X connect 24 1 12 0; +#X connect 25 0 8 0; +#X connect 25 1 9 0; +#X connect 26 0 11 0; +#X connect 27 0 32 0; +#X connect 28 0 31 0; +#X connect 29 0 33 0; +#X connect 30 0 34 0; +#X connect 35 0 25 0; +#X connect 36 0 35 0; +#X connect 36 1 43 0; +#X connect 37 0 10 0; +#X connect 38 0 37 0; +#X connect 39 0 48 0; +#X connect 40 0 20 0; +#X connect 40 1 16 0; +#X connect 40 1 22 0; +#X connect 40 1 19 0; +#X connect 40 2 14 0; +#X connect 41 0 47 0; +#X connect 42 0 35 0; +#X connect 43 0 44 1; +#X connect 44 0 24 0; +#X connect 45 0 46 0; +#X connect 46 0 36 0; +#X connect 47 0 7 0; +#X connect 48 0 41 0; diff --git a/biquad/bq_coef_lowshelf-help.pd b/biquad/bq_coef_lowshelf-help.pd new file mode 100644 index 0000000..7ce08b6 --- /dev/null +++ b/biquad/bq_coef_lowshelf-help.pd @@ -0,0 +1,113 @@ +#N canvas 143 113 484 505 10; +#X obj 29 160 hip~ 2; +#X msg 45 191 clear; +#X obj 156 140 pack f f f f f; +#X obj 156 94 mtof; +#X floatatom 156 77 5 0 0 0 - - -; +#X floatatom 219 98 5 0 0 0 - - -; +#X obj 29 132 noise~; +#N canvas 0 0 450 300 5_line~ 0; +#X obj 80 123 line~; +#X obj 79 147 outlet~; +#X obj 80 73 inlet; +#X obj 136 123 line~; +#X obj 135 147 outlet~; +#X obj 136 73 inlet; +#X obj 193 123 line~; +#X obj 192 147 outlet~; +#X obj 193 73 inlet; +#X obj 247 123 line~; +#X obj 246 147 outlet~; +#X obj 247 73 inlet; +#X obj 304 123 line~; +#X obj 303 147 outlet~; +#X obj 304 73 inlet; +#X msg 80 96 \$1 133; +#X msg 136 96 \$1 133; +#X msg 193 96 \$1 133; +#X msg 247 96 \$1 133; +#X msg 304 96 \$1 133; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 3 0 4 0; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 12 0 13 0; +#X connect 14 0 19 0; +#X connect 15 0 0 0; +#X connect 16 0 3 0; +#X connect 17 0 6 0; +#X connect 18 0 9 0; +#X connect 19 0 12 0; +#X restore 45 258 pd 5_line~; +#X obj 45 231 unpack f f f f f; +#X obj 43 328 dac~; +#X obj 156 166 t a; +#X obj 44 301 *~ 0.1; +#N canvas 0 0 444 301 oscillo 0; +#X obj 41 25 loadbang; +#X obj 26 223 metro 100; +#X obj 8 -9 inlet~; +#X msg 41 47 1; +#X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; +#X obj 118 -3 inlet; +#X msg 147 48 1; +#X msg 115 48 0; +#X obj 118 21 moses 10; +#X obj 19 263 tabwrite~ \$0-oscillo; +#X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 0 0 767 419 (subpatch) 0; +#X array \$0-oscillo 300 float 0; +#X coords 0 1 299 -1 300 80 1; +#X restore 100 100 graph; +#X obj 110 75 change; +#X obj 234 62 block~ 640 1 0.25; +#X connect 0 0 3 0; +#X connect 1 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 8 1 1 1; +#X connect 12 0 1 0; +#X coords 0 -1 1 1 300 80 1 100 100; +#X restore 29 372 pd oscillo; +#X text 192 77 cutoff; +#X text 260 95 gain; +#X obj 156 116 bq_coef_lowshelf; +#X text 153 8 low shelf filter coeficient for a biquad; +#X obj 29 280 bq~ --------; +#X connect 0 0 17 0; +#X connect 1 0 17 0; +#X connect 2 0 10 0; +#X connect 3 0 15 0; +#X connect 4 0 3 0; +#X connect 5 0 15 1; +#X connect 6 0 0 0; +#X connect 7 0 17 1; +#X connect 7 1 17 2; +#X connect 7 2 17 3; +#X connect 7 3 17 4; +#X connect 7 4 17 5; +#X connect 8 0 7 0; +#X connect 8 1 7 1; +#X connect 8 2 7 2; +#X connect 8 3 7 3; +#X connect 8 4 7 4; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 15 0 2 0; +#X connect 15 1 2 1; +#X connect 15 2 2 2; +#X connect 15 3 2 3; +#X connect 15 4 2 4; +#X connect 17 0 11 0; +#X connect 17 0 12 0; diff --git a/biquad/bq_coef_lowshelf.pd b/biquad/bq_coef_lowshelf.pd new file mode 100644 index 0000000..00969c9 --- /dev/null +++ b/biquad/bq_coef_lowshelf.pd @@ -0,0 +1,105 @@ +#N canvas 0 0 551 580 10; +#X obj 50 32 inlet; +#X text 92 34 f; +#X obj 50 185 * 6.283; +#X obj 106 208 samplerate~; +#X obj 106 186 loadbang; +#X obj 164 187 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 240 /; +#X obj 96 292 cos; +#X obj 69 291 sin; +#X obj 319 36 inlet; +#X text 387 176 A; +#X obj 319 121 pow; +#X msg 319 100 10; +#X obj 319 81 t b f; +#X obj 319 58 / 40; +#X obj 319 212 t f f; +#X obj 319 234 *; +#X obj 319 254 + 1; +#X obj 360 213 - 1; +#X obj 360 234 t f f; +#X obj 360 256 *; +#X obj 319 284 -; +#X text 360 309 beta; +#X obj 319 308 sqrt; +#X obj 319 173 t f f f; +#X obj 50 263 t b f f; +#X obj 50 493 /; +#X obj 50 391 expr -2 * ( ($f2-1) + ($f2+1)*$f4 ) \; ($f2+1) + ($f2-1)*$f4 +- $f1*$f3 \; $f2 * ( ($f2+1) - ($f2-1)*$f4 + $f1*$f3 ) \; 2 * $f2 * +( ($f2-1) - ($f2+1)*$f4 ) \; $f2 * ( ($f2+1) - ($f2-1)*$f4 - $f1*$f3 +) \; ($f2+1) + ($f2-1)*$f4 + $f1*$f3 \;; +#X obj 50 525 outlet; +#X obj 99 527 outlet; +#X obj 149 528 outlet; +#X obj 199 528 outlet; +#X obj 249 529 outlet; +#X obj 99 493 /; +#X obj 149 496 /; +#X obj 199 494 /; +#X obj 249 497 /; +#X obj 50 73 max 0; +#X obj 50 99 min 21000; +#X obj 319 149 1; +#X obj 353 125 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 357 f; +#X msg 135 281 1; +#X obj 135 302 sqrt; +#X obj 135 257 loadbang; +#X connect 0 0 37 0; +#X connect 2 0 6 0; +#X connect 3 0 6 1; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 6 0 25 0; +#X connect 7 0 27 3; +#X connect 8 0 27 2; +#X connect 9 0 14 0; +#X connect 11 0 39 0; +#X connect 12 0 11 0; +#X connect 13 0 12 0; +#X connect 13 1 11 1; +#X connect 14 0 13 0; +#X connect 15 0 16 0; +#X connect 15 1 16 1; +#X connect 16 0 17 0; +#X connect 17 0 21 0; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 19 1 20 1; +#X connect 20 0 21 1; +#X connect 21 0 23 0; +#X connect 23 0 27 0; +#X connect 24 0 15 0; +#X connect 24 1 18 0; +#X connect 24 2 27 1; +#X connect 25 0 41 0; +#X connect 25 1 8 0; +#X connect 25 2 7 0; +#X connect 26 0 28 0; +#X connect 27 0 26 0; +#X connect 27 1 33 0; +#X connect 27 2 34 0; +#X connect 27 3 35 0; +#X connect 27 4 36 0; +#X connect 27 5 26 1; +#X connect 27 5 33 1; +#X connect 27 5 34 1; +#X connect 27 5 35 1; +#X connect 27 5 36 1; +#X connect 33 0 29 0; +#X connect 34 0 30 0; +#X connect 35 0 31 0; +#X connect 36 0 32 0; +#X connect 37 0 38 0; +#X connect 38 0 2 0; +#X connect 39 0 24 0; +#X connect 40 0 39 0; +#X connect 41 0 27 0; +#X connect 42 0 43 0; +#X connect 42 0 27 1; +#X connect 43 0 41 1; +#X connect 44 0 42 0; diff --git a/biquad/bq_coef_notch-help.pd b/biquad/bq_coef_notch-help.pd new file mode 100644 index 0000000..5c1d7f0 --- /dev/null +++ b/biquad/bq_coef_notch-help.pd @@ -0,0 +1,113 @@ +#N canvas 143 113 484 505 10; +#X obj 29 160 hip~ 2; +#X msg 48 185 clear; +#X obj 156 140 pack f f f f f; +#X obj 156 94 mtof; +#X floatatom 156 77 5 0 0 0 - - -; +#X floatatom 231 98 5 0 0 0 - - -; +#X obj 29 132 noise~; +#N canvas 0 0 450 300 5_line~ 0; +#X obj 80 123 line~; +#X obj 79 147 outlet~; +#X obj 80 73 inlet; +#X obj 136 123 line~; +#X obj 135 147 outlet~; +#X obj 136 73 inlet; +#X obj 193 123 line~; +#X obj 192 147 outlet~; +#X obj 193 73 inlet; +#X obj 247 123 line~; +#X obj 246 147 outlet~; +#X obj 247 73 inlet; +#X obj 304 123 line~; +#X obj 303 147 outlet~; +#X obj 304 73 inlet; +#X msg 80 96 \$1 133; +#X msg 136 96 \$1 133; +#X msg 193 96 \$1 133; +#X msg 247 96 \$1 133; +#X msg 304 96 \$1 133; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 3 0 4 0; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 12 0 13 0; +#X connect 14 0 19 0; +#X connect 15 0 0 0; +#X connect 16 0 3 0; +#X connect 17 0 6 0; +#X connect 18 0 9 0; +#X connect 19 0 12 0; +#X restore 45 258 pd 5_line~; +#X obj 45 231 unpack f f f f f; +#X obj 43 328 dac~; +#X obj 156 166 t a; +#X obj 44 301 *~ 0.1; +#N canvas 0 0 444 301 oscillo 0; +#X obj 41 25 loadbang; +#X obj 26 223 metro 100; +#X obj 8 -9 inlet~; +#X msg 41 47 1; +#X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; +#X obj 118 -3 inlet; +#X msg 147 48 1; +#X msg 115 48 0; +#X obj 118 21 moses 10; +#X obj 19 263 tabwrite~ \$0-oscillo; +#X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 0 0 767 419 (subpatch) 0; +#X array \$0-oscillo 300 float 0; +#X coords 0 1 299 -1 300 80 1; +#X restore 100 100 graph; +#X obj 110 75 change; +#X obj 234 62 block~ 640 1 0.25; +#X connect 0 0 3 0; +#X connect 1 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 8 1 1 1; +#X connect 12 0 1 0; +#X coords 0 -1 1 1 300 80 1 100 100; +#X restore 29 372 pd oscillo; +#X text 192 77 cutoff; +#X text 155 12 notch filter coeficient for a biquad; +#X obj 156 116 bq_coef_notch; +#X text 269 96 Q; +#X obj 28 280 bq~ --------; +#X connect 0 0 17 0; +#X connect 1 0 17 0; +#X connect 2 0 10 0; +#X connect 3 0 15 0; +#X connect 4 0 3 0; +#X connect 5 0 15 1; +#X connect 6 0 0 0; +#X connect 7 0 17 1; +#X connect 7 1 17 2; +#X connect 7 2 17 3; +#X connect 7 3 17 4; +#X connect 7 4 17 5; +#X connect 8 0 7 0; +#X connect 8 1 7 1; +#X connect 8 2 7 2; +#X connect 8 3 7 3; +#X connect 8 4 7 4; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 15 0 2 0; +#X connect 15 1 2 1; +#X connect 15 2 2 2; +#X connect 15 3 2 3; +#X connect 15 4 2 4; +#X connect 17 0 11 0; +#X connect 17 0 12 0; diff --git a/biquad/bq_coef_notch.pd b/biquad/bq_coef_notch.pd new file mode 100644 index 0000000..abfc38e --- /dev/null +++ b/biquad/bq_coef_notch.pd @@ -0,0 +1,86 @@ +#N canvas 0 0 387 638 10; +#X obj 50 32 inlet; +#X obj 205 31 inlet; +#X text 92 34 f; +#X text 250 31 Q; +#X obj 119 148 samplerate~; +#X obj 119 125 loadbang; +#X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 180 /; +#X obj 50 349 cos; +#X obj 199 276 sin; +#X obj 205 126 * 2; +#X obj 50 574 outlet; +#X obj 288 484 + 1; +#X obj 50 467 * -2; +#X obj 50 249 t f f; +#X obj 50 519 /; +#X obj 94 520 /; +#X obj 139 520 /; +#X obj 229 520 /; +#X obj 139 574 outlet; +#X obj 94 574 outlet; +#X obj 184 574 outlet; +#X obj 229 574 outlet; +#X obj 50 226 f; +#X obj 205 195 t b f; +#X msg 94 438 1 \$1; +#X obj 94 483 -; +#X obj 199 330 t f b f; +#X obj 205 74 max 0; +#X obj 50 73 max 0; +#X obj 50 122 * 3.14159; +#X msg 205 148 1 \$1; +#X obj 232 242 sinh; +#X obj 205 170 /; +#X obj 199 303 *; +#X obj 50 148 * 2; +#X msg 139 487 1; +#X msg 231 481 1; +#X obj 50 548 t f f; +#X obj 205 104 + 0.1; +#X obj 50 99 min 21000; +#X connect 0 0 29 0; +#X connect 1 0 28 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 23 0; +#X connect 8 0 13 0; +#X connect 9 0 34 0; +#X connect 10 0 31 0; +#X connect 12 0 15 1; +#X connect 12 0 16 1; +#X connect 12 0 17 1; +#X connect 12 0 18 1; +#X connect 13 0 15 0; +#X connect 14 0 8 0; +#X connect 14 1 9 0; +#X connect 15 0 38 0; +#X connect 16 0 20 0; +#X connect 17 0 19 0; +#X connect 18 0 22 0; +#X connect 23 0 14 0; +#X connect 24 0 23 0; +#X connect 24 1 32 0; +#X connect 25 0 26 0; +#X connect 26 0 16 0; +#X connect 27 0 25 0; +#X connect 27 1 36 0; +#X connect 27 1 37 0; +#X connect 27 2 12 0; +#X connect 28 0 39 0; +#X connect 29 0 40 0; +#X connect 30 0 35 0; +#X connect 31 0 33 0; +#X connect 32 0 34 1; +#X connect 33 0 24 0; +#X connect 34 0 27 0; +#X connect 35 0 7 0; +#X connect 36 0 17 0; +#X connect 37 0 18 0; +#X connect 38 0 11 0; +#X connect 38 1 21 0; +#X connect 39 0 10 0; +#X connect 40 0 30 0; diff --git a/biquad/bq_coef_peak-help.pd b/biquad/bq_coef_peak-help.pd new file mode 100644 index 0000000..45e9eb2 --- /dev/null +++ b/biquad/bq_coef_peak-help.pd @@ -0,0 +1,116 @@ +#N canvas 143 113 484 505 10; +#X obj 29 160 hip~ 2; +#X msg 43 188 clear; +#X obj 156 140 pack f f f f f; +#X obj 156 94 mtof; +#X floatatom 156 77 5 0 0 0 - - -; +#X floatatom 190 98 5 0 0 0 - - -; +#X obj 29 132 noise~; +#N canvas 0 0 450 300 5_line~ 0; +#X obj 80 123 line~; +#X obj 79 147 outlet~; +#X obj 80 73 inlet; +#X obj 136 123 line~; +#X obj 135 147 outlet~; +#X obj 136 73 inlet; +#X obj 193 123 line~; +#X obj 192 147 outlet~; +#X obj 193 73 inlet; +#X obj 247 123 line~; +#X obj 246 147 outlet~; +#X obj 247 73 inlet; +#X obj 304 123 line~; +#X obj 303 147 outlet~; +#X obj 304 73 inlet; +#X msg 80 96 \$1 133; +#X msg 136 96 \$1 133; +#X msg 193 96 \$1 133; +#X msg 247 96 \$1 133; +#X msg 304 96 \$1 133; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 3 0 4 0; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 12 0 13 0; +#X connect 14 0 19 0; +#X connect 15 0 0 0; +#X connect 16 0 3 0; +#X connect 17 0 6 0; +#X connect 18 0 9 0; +#X connect 19 0 12 0; +#X restore 45 258 pd 5_line~; +#X obj 45 231 unpack f f f f f; +#X obj 43 328 dac~; +#X obj 156 166 t a; +#X obj 44 301 *~ 0.1; +#N canvas 0 0 444 301 oscillo 0; +#X obj 41 25 loadbang; +#X obj 26 223 metro 100; +#X obj 8 -9 inlet~; +#X msg 41 47 1; +#X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; +#X obj 118 -3 inlet; +#X msg 147 48 1; +#X msg 115 48 0; +#X obj 118 21 moses 10; +#X obj 19 263 tabwrite~ \$0-oscillo; +#X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 0 0 767 419 (subpatch) 0; +#X array \$0-oscillo 300 float 0; +#X coords 0 1 299 -1 300 80 1; +#X restore 100 100 graph; +#X obj 110 75 change; +#X obj 234 62 block~ 640 1 0.25; +#X connect 0 0 3 0; +#X connect 1 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 8 1 1 1; +#X connect 12 0 1 0; +#X coords 0 -1 1 1 300 80 1 100 100; +#X restore 29 372 pd oscillo; +#X text 192 77 cutoff; +#X text 155 12 notch filter coeficient for a biquad; +#X text 228 96 Q; +#X obj 156 116 bq_coef_peak; +#X floatatom 244 98 5 0 0 0 - - -; +#X text 282 96 Gain; +#X obj 29 280 bq~ --------; +#X connect 0 0 19 0; +#X connect 1 0 19 0; +#X connect 2 0 10 0; +#X connect 3 0 16 0; +#X connect 4 0 3 0; +#X connect 5 0 16 1; +#X connect 6 0 0 0; +#X connect 7 0 19 1; +#X connect 7 1 19 2; +#X connect 7 2 19 3; +#X connect 7 3 19 4; +#X connect 7 4 19 5; +#X connect 8 0 7 0; +#X connect 8 1 7 1; +#X connect 8 2 7 2; +#X connect 8 3 7 3; +#X connect 8 4 7 4; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 16 0 2 0; +#X connect 16 1 2 1; +#X connect 16 2 2 2; +#X connect 16 3 2 3; +#X connect 16 4 2 4; +#X connect 17 0 16 2; +#X connect 19 0 11 0; +#X connect 19 0 12 0; diff --git a/biquad/bq_coef_peak.pd b/biquad/bq_coef_peak.pd new file mode 100644 index 0000000..a3f2e2b --- /dev/null +++ b/biquad/bq_coef_peak.pd @@ -0,0 +1,113 @@ +#N canvas 0 0 433 621 10; +#X obj 50 32 inlet; +#X obj 206 31 inlet; +#X text 92 34 f; +#X text 251 31 Q; +#X obj 119 148 samplerate~; +#X obj 119 125 loadbang; +#X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 180 /; +#X obj 50 349 cos; +#X obj 200 276 sin; +#X obj 206 126 * 2; +#X obj 50 574 outlet; +#X obj 283 485 + 1; +#X obj 50 467 * -2; +#X obj 50 249 t f f; +#X obj 50 519 /; +#X obj 94 520 /; +#X obj 139 520 /; +#X obj 229 520 /; +#X obj 139 574 outlet; +#X obj 94 574 outlet; +#X obj 184 574 outlet; +#X obj 229 574 outlet; +#X obj 50 226 f; +#X obj 206 195 t b f; +#X msg 94 458 1 \$1; +#X obj 206 74 max 0; +#X obj 50 73 max 0; +#X obj 50 128 * 3.14159; +#X msg 206 148 1 \$1; +#X obj 233 226 sinh; +#X obj 206 170 /; +#X obj 50 148 * 2; +#X obj 50 548 t f f; +#X obj 206 104 + 0.1; +#X obj 302 32 inlet; +#X text 344 198 A; +#X obj 302 117 pow; +#X msg 302 96 10; +#X obj 302 77 t b f; +#X obj 302 54 / 40; +#X msg 140 460 1 \$1; +#X msg 230 460 1 \$1; +#X obj 230 485 -; +#X obj 200 356 t f f; +#X obj 302 202 t b f; +#X obj 140 485 +; +#X obj 94 483 -; +#X obj 50 99 min 21000; +#X obj 200 406 / 1; +#X obj 230 407 * 1; +#X obj 283 407 / 1; +#X obj 200 303 * 74.2; +#X connect 0 0 27 0; +#X connect 1 0 26 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 23 0; +#X connect 8 0 13 0; +#X connect 9 0 52 0; +#X connect 10 0 29 0; +#X connect 12 0 15 1; +#X connect 12 0 16 1; +#X connect 12 0 17 1; +#X connect 12 0 18 1; +#X connect 13 0 15 0; +#X connect 14 0 8 0; +#X connect 14 1 9 0; +#X connect 15 0 33 0; +#X connect 16 0 20 0; +#X connect 17 0 19 0; +#X connect 18 0 22 0; +#X connect 23 0 14 0; +#X connect 24 0 23 0; +#X connect 24 1 30 0; +#X connect 25 0 47 0; +#X connect 26 0 34 0; +#X connect 27 0 48 0; +#X connect 28 0 32 0; +#X connect 29 0 31 0; +#X connect 30 0 52 1; +#X connect 31 0 24 0; +#X connect 32 0 7 0; +#X connect 33 0 11 0; +#X connect 33 1 21 0; +#X connect 34 0 10 0; +#X connect 35 0 40 0; +#X connect 37 0 45 0; +#X connect 38 0 37 0; +#X connect 39 0 38 0; +#X connect 39 1 37 1; +#X connect 40 0 39 0; +#X connect 41 0 46 0; +#X connect 42 0 43 0; +#X connect 43 0 18 0; +#X connect 44 0 49 0; +#X connect 44 0 50 0; +#X connect 44 1 51 0; +#X connect 45 0 23 0; +#X connect 45 1 49 1; +#X connect 45 1 50 1; +#X connect 45 1 51 1; +#X connect 46 0 17 0; +#X connect 47 0 16 0; +#X connect 48 0 28 0; +#X connect 49 0 25 0; +#X connect 50 0 42 0; +#X connect 50 0 41 0; +#X connect 51 0 12 0; +#X connect 52 0 44 0; diff --git a/biquad/bq~-help.pd b/biquad/bq~-help.pd new file mode 100644 index 0000000..45b2b51 --- /dev/null +++ b/biquad/bq~-help.pd @@ -0,0 +1,927 @@ +#N canvas 425 30 597 738 10; +#X floatatom 372 232 9 0 0 0 - - -; +#X obj 372 213 mtof; +#X floatatom 372 197 5 0 127 0 - - -; +#X floatatom 507 231 5 0 0 0 - - -; +#N canvas 435 52 535 646 coef_lowShelf_biquad 0; +#X obj 50 32 inlet; +#X text 92 34 f; +#X obj 50 185 * 6.283; +#X obj 106 208 samplerate~; +#X obj 106 186 loadbang; +#X obj 164 187 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 240 /; +#X obj 96 292 cos; +#X obj 69 291 sin; +#X obj 319 36 inlet; +#X text 387 176 A; +#X obj 319 121 pow; +#X msg 319 100 10; +#X obj 319 81 t b f; +#X obj 319 58 / 40; +#X obj 319 212 t f f; +#X obj 319 234 *; +#X obj 319 254 + 1; +#X obj 360 213 - 1; +#X obj 360 234 t f f; +#X obj 360 256 *; +#X obj 319 284 -; +#X text 360 309 beta; +#X obj 319 308 sqrt; +#X obj 319 173 t f f f; +#X obj 50 263 t b f f; +#X obj 50 493 /; +#X obj 50 391 expr -2 * ( ($f2-1) + ($f2+1)*$f4 ) \; ($f2+1) + ($f2-1)*$f4 +- $f1*$f3 \; $f2 * ( ($f2+1) - ($f2-1)*$f4 + $f1*$f3 ) \; 2 * $f2 * +( ($f2-1) - ($f2+1)*$f4 ) \; $f2 * ( ($f2+1) - ($f2-1)*$f4 - $f1*$f3 +) \; ($f2+1) + ($f2-1)*$f4 + $f1*$f3 \;; +#X obj 50 525 outlet; +#X obj 99 527 outlet; +#X obj 149 528 outlet; +#X obj 199 528 outlet; +#X obj 249 529 outlet; +#X obj 99 493 /; +#X obj 149 496 /; +#X obj 199 494 /; +#X obj 249 497 /; +#X obj 50 73 max 0; +#X obj 50 99 min 21000; +#X obj 319 149 1; +#X obj 353 125 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 357 f; +#X msg 135 281 1; +#X obj 135 302 sqrt; +#X obj 135 257 loadbang; +#X connect 0 0 37 0; +#X connect 2 0 6 0; +#X connect 3 0 6 1; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 6 0 25 0; +#X connect 7 0 27 3; +#X connect 8 0 27 2; +#X connect 9 0 14 0; +#X connect 11 0 39 0; +#X connect 12 0 11 0; +#X connect 13 0 12 0; +#X connect 13 1 11 1; +#X connect 14 0 13 0; +#X connect 15 0 16 0; +#X connect 15 1 16 1; +#X connect 16 0 17 0; +#X connect 17 0 21 0; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 19 1 20 1; +#X connect 20 0 21 1; +#X connect 21 0 23 0; +#X connect 23 0 27 0; +#X connect 24 0 15 0; +#X connect 24 1 18 0; +#X connect 24 2 27 1; +#X connect 25 0 41 0; +#X connect 25 1 8 0; +#X connect 25 2 7 0; +#X connect 26 0 28 0; +#X connect 27 0 26 0; +#X connect 27 1 33 0; +#X connect 27 2 34 0; +#X connect 27 3 35 0; +#X connect 27 4 36 0; +#X connect 27 5 26 1; +#X connect 27 5 33 1; +#X connect 27 5 34 1; +#X connect 27 5 35 1; +#X connect 27 5 36 1; +#X connect 33 0 29 0; +#X connect 34 0 30 0; +#X connect 35 0 31 0; +#X connect 36 0 32 0; +#X connect 37 0 38 0; +#X connect 38 0 2 0; +#X connect 39 0 24 0; +#X connect 40 0 39 0; +#X connect 41 0 27 0; +#X connect 42 0 43 0; +#X connect 42 0 27 1; +#X connect 43 0 41 1; +#X connect 44 0 42 0; +#X restore 372 253 pd coef_lowShelf_biquad; +#X obj 42 545 hip~ 2; +#N canvas 275 396 358 628 coef_hpf_biquad 0; +#X obj 50 32 inlet; +#X obj 211 31 inlet; +#X text 92 34 f; +#X text 256 31 Q; +#X obj 116 138 samplerate~; +#X obj 116 115 loadbang; +#X obj 173 116 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 170 /; +#X obj 50 339 cos; +#X obj 199 266 sin; +#X obj 211 116 * 2; +#X obj 50 534 outlet; +#X obj 288 474 + 1; +#X obj 139 471 / 2; +#X msg 139 428 1 \$1; +#X obj 184 450 -; +#X obj 229 471 / 2; +#X msg 229 428 1 \$1; +#X obj 50 457 * -2; +#X obj 50 239 t f f; +#X obj 50 509 /; +#X obj 94 510 /; +#X obj 139 510 /; +#X obj 184 509 /; +#X obj 229 510 /; +#X obj 139 534 outlet; +#X obj 94 534 outlet; +#X obj 184 534 outlet; +#X obj 229 534 outlet; +#X obj 50 216 f; +#X obj 211 185 t b f; +#X obj 211 95 + 0.707; +#X msg 94 428 1 \$1; +#X obj 94 473 -; +#X obj 199 320 t f f; +#X obj 139 450 +; +#X obj 229 451 +; +#X msg 184 428 -1 \$1; +#X obj 211 74 max 0; +#X obj 50 73 max 0; +#X obj 50 364 t f f b; +#X obj 50 115 * 3.14159; +#X obj 60 193 min 3.14; +#X obj 199 294 * 0.767; +#X obj 238 254 sinh; +#X msg 211 140 1 \$1; +#X obj 211 162 /; +#X obj 50 144 * 2; +#X obj 50 95 min 21000; +#X connect 0 0 39 0; +#X connect 1 0 38 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 29 0; +#X connect 8 0 40 0; +#X connect 9 0 43 0; +#X connect 10 0 45 0; +#X connect 12 0 20 1; +#X connect 12 0 21 1; +#X connect 12 0 22 1; +#X connect 12 0 23 1; +#X connect 12 0 24 1; +#X connect 13 0 22 0; +#X connect 14 0 35 0; +#X connect 15 0 23 0; +#X connect 16 0 24 0; +#X connect 17 0 36 0; +#X connect 18 0 20 0; +#X connect 19 0 8 0; +#X connect 19 1 9 0; +#X connect 20 0 11 0; +#X connect 21 0 26 0; +#X connect 22 0 25 0; +#X connect 23 0 27 0; +#X connect 24 0 28 0; +#X connect 29 0 19 0; +#X connect 30 0 29 0; +#X connect 30 1 44 0; +#X connect 31 0 10 0; +#X connect 32 0 33 0; +#X connect 33 0 21 0; +#X connect 34 0 32 0; +#X connect 34 1 12 0; +#X connect 35 0 13 0; +#X connect 36 0 16 0; +#X connect 37 0 15 0; +#X connect 38 0 31 0; +#X connect 39 0 48 0; +#X connect 40 0 18 0; +#X connect 40 1 14 0; +#X connect 40 1 37 0; +#X connect 40 1 17 0; +#X connect 40 2 33 0; +#X connect 41 0 47 0; +#X connect 42 0 29 0; +#X connect 43 0 34 0; +#X connect 44 0 43 1; +#X connect 45 0 46 0; +#X connect 46 0 30 0; +#X connect 47 0 7 0; +#X connect 48 0 41 0; +#X restore 177 242 pd coef_hpf_biquad; +#N canvas 269 177 545 625 coef_bpf_biquad 0; +#X obj 50 32 inlet; +#X obj 211 31 inlet; +#X text 92 34 f; +#X text 256 31 Q; +#X obj 119 148 samplerate~; +#X obj 119 125 loadbang; +#X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 180 /; +#X obj 50 349 cos; +#X obj 199 276 sin; +#X obj 211 126 * 2; +#X obj 50 544 outlet; +#X obj 288 484 + 1; +#X obj 50 467 * -2; +#X obj 50 249 t f f; +#X obj 50 519 /; +#X obj 94 520 /; +#X obj 139 520 /; +#X obj 229 520 /; +#X obj 139 544 outlet; +#X obj 94 544 outlet; +#X obj 184 544 outlet; +#X obj 229 544 outlet; +#X obj 50 226 f; +#X obj 211 195 t b f; +#X msg 94 438 1 \$1; +#X obj 94 483 -; +#X obj 229 481 * -1; +#X msg 184 520 0; +#X obj 199 330 t f b f; +#X obj 211 74 max 0; +#X obj 50 73 max 0; +#X obj 50 122 * 3.14159; +#X obj 211 105 + 0.7; +#X msg 211 148 1 \$1; +#X obj 238 242 sinh; +#X obj 211 170 /; +#X obj 50 148 * 2; +#X obj 50 99 min 21000; +#X obj 199 303 * 0.767; +#X connect 0 0 31 0; +#X connect 1 0 30 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 23 0; +#X connect 8 0 13 0; +#X connect 9 0 39 0; +#X connect 10 0 34 0; +#X connect 12 0 15 1; +#X connect 12 0 16 1; +#X connect 12 0 17 1; +#X connect 12 0 18 1; +#X connect 13 0 15 0; +#X connect 14 0 8 0; +#X connect 14 1 9 0; +#X connect 15 0 11 0; +#X connect 16 0 20 0; +#X connect 17 0 19 0; +#X connect 18 0 22 0; +#X connect 23 0 14 0; +#X connect 24 0 23 0; +#X connect 24 1 35 0; +#X connect 25 0 26 0; +#X connect 26 0 16 0; +#X connect 27 0 18 0; +#X connect 28 0 21 0; +#X connect 29 0 25 0; +#X connect 29 0 17 0; +#X connect 29 0 27 0; +#X connect 29 1 28 0; +#X connect 29 2 12 0; +#X connect 30 0 33 0; +#X connect 31 0 38 0; +#X connect 32 0 37 0; +#X connect 33 0 10 0; +#X connect 34 0 36 0; +#X connect 35 0 39 1; +#X connect 36 0 24 0; +#X connect 37 0 7 0; +#X connect 38 0 32 0; +#X connect 39 0 29 0; +#X restore 188 335 pd coef_bpf_biquad; +#X msg 95 544 clear; +#N canvas 520 123 368 628 coef_lpf_biquad 0; +#X obj 50 32 inlet; +#X obj 211 31 inlet; +#X text 92 34 f; +#X text 256 31 Q; +#X obj 117 137 samplerate~; +#X obj 117 114 loadbang; +#X obj 174 115 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 170 /; +#X obj 50 369 cos; +#X obj 199 296 sin; +#X obj 211 116 * 2; +#X obj 50 564 outlet; +#X obj 288 504 + 1; +#X obj 139 501 / 2; +#X obj 94 505 -; +#X msg 99 463 1 \$1; +#X msg 139 458 1 \$1; +#X obj 184 480 -; +#X obj 229 501 / 2; +#X msg 229 460 1 \$1; +#X obj 50 487 * -2; +#X obj 139 480 -; +#X msg 184 458 1 \$1; +#X obj 229 481 -; +#X obj 199 350 t f f; +#X obj 50 269 t f f; +#X obj 50 539 /; +#X obj 94 540 /; +#X obj 139 540 /; +#X obj 184 539 /; +#X obj 229 540 /; +#X obj 139 564 outlet; +#X obj 94 564 outlet; +#X obj 184 564 outlet; +#X obj 229 564 outlet; +#X obj 50 246 f; +#X obj 211 185 t b f; +#X obj 211 95 + 0.707; +#X obj 211 74 max 0; +#X obj 50 73 max 0; +#X obj 50 394 t f f b; +#X obj 50 115 * 3.14159; +#X obj 67 206 min 3.14; +#X obj 238 295 sinh; +#X obj 199 325 * 0.767; +#X msg 211 140 1 \$1; +#X obj 211 162 /; +#X obj 50 143 * 2; +#X obj 50 95 min 21000; +#X connect 0 0 39 0; +#X connect 1 0 38 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 35 0; +#X connect 8 0 40 0; +#X connect 9 0 44 0; +#X connect 10 0 45 0; +#X connect 12 0 26 1; +#X connect 12 0 27 1; +#X connect 12 0 28 1; +#X connect 12 0 29 1; +#X connect 12 0 30 1; +#X connect 13 0 28 0; +#X connect 14 0 27 0; +#X connect 15 0 14 0; +#X connect 16 0 21 0; +#X connect 17 0 29 0; +#X connect 18 0 30 0; +#X connect 19 0 23 0; +#X connect 20 0 26 0; +#X connect 21 0 13 0; +#X connect 22 0 17 0; +#X connect 23 0 18 0; +#X connect 24 0 15 0; +#X connect 24 1 12 0; +#X connect 25 0 8 0; +#X connect 25 1 9 0; +#X connect 26 0 11 0; +#X connect 27 0 32 0; +#X connect 28 0 31 0; +#X connect 29 0 33 0; +#X connect 30 0 34 0; +#X connect 35 0 25 0; +#X connect 36 0 35 0; +#X connect 36 1 43 0; +#X connect 37 0 10 0; +#X connect 38 0 37 0; +#X connect 39 0 48 0; +#X connect 40 0 20 0; +#X connect 40 1 16 0; +#X connect 40 1 22 0; +#X connect 40 1 19 0; +#X connect 40 2 14 0; +#X connect 41 0 47 0; +#X connect 42 0 35 0; +#X connect 43 0 44 1; +#X connect 44 0 24 0; +#X connect 45 0 46 0; +#X connect 46 0 36 0; +#X connect 47 0 7 0; +#X connect 48 0 41 0; +#X restore 165 154 pd coef_lpf_biquad; +#X obj 165 178 pack f f f f f; +#X obj 165 132 mtof; +#X floatatom 165 115 5 0 0 0 - - -; +#X floatatom 270 133 5 0 0 0 - - -; +#X obj 177 266 pack f f f f f; +#X obj 177 221 mtof; +#X floatatom 177 203 5 0 0 0 - - -; +#X floatatom 282 221 5 0 0 0 - - -; +#X obj 188 356 pack f f f f f; +#X obj 188 311 mtof; +#X floatatom 188 291 5 0 0 0 - - -; +#X floatatom 293 311 5 0 0 0 - - -; +#X obj 200 443 pack f f f f f; +#X obj 200 398 mtof; +#X floatatom 200 380 5 0 0 0 - - -; +#X floatatom 318 400 5 0 0 0 - - -; +#N canvas 101 71 356 625 coef_notch_biquad 0; +#X obj 50 32 inlet; +#X obj 205 31 inlet; +#X text 92 34 f; +#X text 250 31 Q; +#X obj 119 148 samplerate~; +#X obj 119 125 loadbang; +#X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 180 /; +#X obj 50 349 cos; +#X obj 199 276 sin; +#X obj 205 126 * 2; +#X obj 50 574 outlet; +#X obj 288 484 + 1; +#X obj 50 467 * -2; +#X obj 50 249 t f f; +#X obj 50 519 /; +#X obj 94 520 /; +#X obj 139 520 /; +#X obj 229 520 /; +#X obj 139 574 outlet; +#X obj 94 574 outlet; +#X obj 184 574 outlet; +#X obj 229 574 outlet; +#X obj 50 226 f; +#X obj 205 195 t b f; +#X msg 94 438 1 \$1; +#X obj 94 483 -; +#X obj 199 330 t f b f; +#X obj 205 74 max 0; +#X obj 50 73 max 0; +#X obj 50 122 * 3.14159; +#X msg 205 148 1 \$1; +#X obj 232 242 sinh; +#X obj 205 170 /; +#X obj 199 303 *; +#X obj 50 148 * 2; +#X msg 139 487 1; +#X msg 231 481 1; +#X obj 50 548 t f f; +#X obj 205 104 + 0.1; +#X obj 50 99 min 21000; +#X connect 0 0 29 0; +#X connect 1 0 28 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 23 0; +#X connect 8 0 13 0; +#X connect 9 0 34 0; +#X connect 10 0 31 0; +#X connect 12 0 15 1; +#X connect 12 0 16 1; +#X connect 12 0 17 1; +#X connect 12 0 18 1; +#X connect 13 0 15 0; +#X connect 14 0 8 0; +#X connect 14 1 9 0; +#X connect 15 0 38 0; +#X connect 16 0 20 0; +#X connect 17 0 19 0; +#X connect 18 0 22 0; +#X connect 23 0 14 0; +#X connect 24 0 23 0; +#X connect 24 1 32 0; +#X connect 25 0 26 0; +#X connect 26 0 16 0; +#X connect 27 0 25 0; +#X connect 27 1 36 0; +#X connect 27 1 37 0; +#X connect 27 2 12 0; +#X connect 28 0 39 0; +#X connect 29 0 40 0; +#X connect 30 0 35 0; +#X connect 31 0 33 0; +#X connect 32 0 34 1; +#X connect 33 0 24 0; +#X connect 34 0 27 0; +#X connect 35 0 7 0; +#X connect 36 0 17 0; +#X connect 37 0 18 0; +#X connect 38 0 11 0; +#X connect 38 1 21 0; +#X connect 39 0 10 0; +#X connect 40 0 30 0; +#X restore 200 421 pd coef_notch_biquad; +#X obj 42 517 noise~; +#X obj 41 640 dac~; +#X obj 165 483 t a; +#X obj 355 176 pack f f f f f; +#X obj 355 131 mtof; +#X floatatom 355 113 5 0 0 0 - - -; +#X floatatom 416 131 5 0 0 0 - - -; +#X obj 355 451 t a; +#N canvas 101 71 356 625 coef_peak_biquad 0; +#X obj 50 32 inlet; +#X obj 206 31 inlet; +#X text 92 34 f; +#X text 251 31 Q; +#X obj 119 148 samplerate~; +#X obj 119 125 loadbang; +#X obj 176 126 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 180 /; +#X obj 50 349 cos; +#X obj 200 276 sin; +#X obj 206 126 * 2; +#X obj 50 574 outlet; +#X obj 283 485 + 1; +#X obj 50 467 * -2; +#X obj 50 249 t f f; +#X obj 50 519 /; +#X obj 94 520 /; +#X obj 139 520 /; +#X obj 229 520 /; +#X obj 139 574 outlet; +#X obj 94 574 outlet; +#X obj 184 574 outlet; +#X obj 229 574 outlet; +#X obj 50 226 f; +#X obj 206 195 t b f; +#X msg 94 458 1 \$1; +#X obj 206 74 max 0; +#X obj 50 73 max 0; +#X obj 50 128 * 3.14159; +#X msg 206 148 1 \$1; +#X obj 233 226 sinh; +#X obj 206 170 /; +#X obj 50 148 * 2; +#X obj 50 548 t f f; +#X obj 206 104 + 0.1; +#X obj 302 32 inlet; +#X text 344 198 A; +#X obj 302 117 pow; +#X msg 302 96 10; +#X obj 302 77 t b f; +#X obj 302 54 / 40; +#X msg 140 460 1 \$1; +#X msg 230 460 1 \$1; +#X obj 230 485 -; +#X obj 200 356 t f f; +#X obj 302 202 t b f; +#X obj 140 485 +; +#X obj 94 483 -; +#X obj 50 99 min 21000; +#X obj 200 406 / 1; +#X obj 230 407 * 1; +#X obj 283 407 / 1; +#X obj 200 303 * 74.2; +#X connect 0 0 27 0; +#X connect 1 0 26 0; +#X connect 4 0 7 1; +#X connect 5 0 4 0; +#X connect 6 0 4 0; +#X connect 7 0 23 0; +#X connect 8 0 13 0; +#X connect 9 0 52 0; +#X connect 10 0 29 0; +#X connect 12 0 15 1; +#X connect 12 0 16 1; +#X connect 12 0 17 1; +#X connect 12 0 18 1; +#X connect 13 0 15 0; +#X connect 14 0 8 0; +#X connect 14 1 9 0; +#X connect 15 0 33 0; +#X connect 16 0 20 0; +#X connect 17 0 19 0; +#X connect 18 0 22 0; +#X connect 23 0 14 0; +#X connect 24 0 23 0; +#X connect 24 1 30 0; +#X connect 25 0 47 0; +#X connect 26 0 34 0; +#X connect 27 0 48 0; +#X connect 28 0 32 0; +#X connect 29 0 31 0; +#X connect 30 0 52 1; +#X connect 31 0 24 0; +#X connect 32 0 7 0; +#X connect 33 0 11 0; +#X connect 33 1 21 0; +#X connect 34 0 10 0; +#X connect 35 0 40 0; +#X connect 37 0 45 0; +#X connect 38 0 37 0; +#X connect 39 0 38 0; +#X connect 39 1 37 1; +#X connect 40 0 39 0; +#X connect 41 0 46 0; +#X connect 42 0 43 0; +#X connect 43 0 18 0; +#X connect 44 0 49 0; +#X connect 44 0 50 0; +#X connect 44 1 51 0; +#X connect 45 0 23 0; +#X connect 45 1 49 1; +#X connect 45 1 50 1; +#X connect 45 1 51 1; +#X connect 46 0 17 0; +#X connect 47 0 16 0; +#X connect 48 0 28 0; +#X connect 49 0 25 0; +#X connect 50 0 42 0; +#X connect 50 0 41 0; +#X connect 51 0 12 0; +#X connect 52 0 44 0; +#X restore 355 154 pd coef_peak_biquad; +#X floatatom 477 134 5 0 0 0 - - -; +#X obj 42 613 *~ 0.1; +#X obj 372 276 pack f f f f f; +#X floatatom 388 337 9 0 0 0 - - -; +#X obj 388 318 mtof; +#X floatatom 388 302 5 0 127 0 - - -; +#X floatatom 523 336 5 0 0 0 - - -; +#X obj 388 381 pack f f f f f; +#N canvas 435 52 535 646 coef_highShelf_biquad 0; +#X obj 50 32 inlet; +#X text 92 34 f; +#X obj 50 165 * 6.283; +#X obj 106 188 samplerate~; +#X obj 106 166 loadbang; +#X obj 164 167 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 50 220 /; +#X obj 96 272 cos; +#X obj 69 271 sin; +#X obj 319 36 inlet; +#X text 387 146 A; +#X obj 319 121 pow; +#X msg 319 100 10; +#X obj 319 81 t b f; +#X obj 319 58 / 40; +#X obj 319 182 t f f; +#X obj 319 204 *; +#X obj 319 224 + 1; +#X obj 360 183 - 1; +#X obj 360 204 t f f; +#X obj 360 226 *; +#X obj 319 254 -; +#X text 360 279 beta; +#X obj 319 278 sqrt; +#X obj 319 143 t f f f; +#X obj 50 243 t b f f; +#X obj 50 493 /; +#X obj 50 525 outlet; +#X obj 99 527 outlet; +#X obj 149 528 outlet; +#X obj 199 528 outlet; +#X obj 249 529 outlet; +#X obj 99 493 /; +#X obj 149 496 /; +#X obj 199 494 /; +#X obj 249 497 /; +#X obj 50 392 expr 2 * ( ($f2-1) - ($f2+1)*$f4 ) \; ($f2+1) - ($f2-1)*$f4 +- $f1*$f3 \; $f2 * ( ($f2+1) + ($f2-1)*$f4 + $f1*$f3 ) \; -2 * $f2 +* ( ($f2-1) + ($f2+1)*$f4 ) \; $f2 * ( ($f2+1) + ($f2-1)*$f4 - $f1*$f3 +) \; ($f2+1) - ($f2-1)*$f4 + $f1*$f3 \;; +#X obj 50 73 max 0; +#X obj 50 99 min 21000; +#X obj 50 357 f; +#X msg 135 281 1; +#X obj 135 302 sqrt; +#X obj 135 257 loadbang; +#X connect 0 0 37 0; +#X connect 2 0 6 0; +#X connect 3 0 6 1; +#X connect 4 0 3 0; +#X connect 5 0 3 0; +#X connect 6 0 25 0; +#X connect 7 0 36 3; +#X connect 8 0 36 2; +#X connect 9 0 14 0; +#X connect 11 0 24 0; +#X connect 12 0 11 0; +#X connect 13 0 12 0; +#X connect 13 1 11 1; +#X connect 14 0 13 0; +#X connect 15 0 16 0; +#X connect 15 1 16 1; +#X connect 16 0 17 0; +#X connect 17 0 21 0; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 19 1 20 1; +#X connect 20 0 21 1; +#X connect 21 0 23 0; +#X connect 23 0 36 0; +#X connect 24 0 15 0; +#X connect 24 1 18 0; +#X connect 24 2 36 1; +#X connect 25 0 39 0; +#X connect 25 1 8 0; +#X connect 25 2 7 0; +#X connect 26 0 27 0; +#X connect 32 0 28 0; +#X connect 33 0 29 0; +#X connect 34 0 30 0; +#X connect 35 0 31 0; +#X connect 36 0 26 0; +#X connect 36 1 32 0; +#X connect 36 2 33 0; +#X connect 36 3 34 0; +#X connect 36 4 35 0; +#X connect 36 5 26 1; +#X connect 36 5 32 1; +#X connect 36 5 33 1; +#X connect 36 5 34 1; +#X connect 36 5 35 1; +#X connect 37 0 38 0; +#X connect 38 0 2 0; +#X connect 39 0 36 0; +#X connect 40 0 41 0; +#X connect 40 0 36 1; +#X connect 41 0 39 1; +#X connect 42 0 40 0; +#X restore 388 358 pd coef_highShelf_biquad; +#X text 59 45 y(n) = b0 x(n) + b1 x(n-1) + b2 x(n-2) -a1 y(n-1) -a2 +y(n-2); +#N canvas 0 0 450 300 5_line~ 0; +#X obj 80 123 line~; +#X obj 79 147 outlet~; +#X obj 80 73 inlet; +#X obj 136 123 line~; +#X obj 135 147 outlet~; +#X obj 136 73 inlet; +#X obj 193 123 line~; +#X obj 192 147 outlet~; +#X obj 193 73 inlet; +#X obj 247 123 line~; +#X obj 246 147 outlet~; +#X obj 247 73 inlet; +#X obj 304 123 line~; +#X obj 303 147 outlet~; +#X obj 304 73 inlet; +#X msg 80 96 \$1 133; +#X msg 136 96 \$1 133; +#X msg 193 96 \$1 133; +#X msg 247 96 \$1 133; +#X msg 304 96 \$1 133; +#X connect 0 0 1 0; +#X connect 2 0 15 0; +#X connect 3 0 4 0; +#X connect 5 0 16 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 9 0 10 0; +#X connect 11 0 18 0; +#X connect 12 0 13 0; +#X connect 14 0 19 0; +#X connect 15 0 0 0; +#X connect 16 0 3 0; +#X connect 17 0 6 0; +#X connect 18 0 9 0; +#X connect 19 0 12 0; +#X restore 165 535 pd 5_line~; +#X obj 165 508 unpack f f f f f; +#N canvas 0 0 444 301 oscillo 0; +#X obj 41 25 loadbang; +#X obj 26 223 metro 100; +#X obj 8 -9 inlet~; +#X msg 41 47 1; +#X obj 42 81 tgl 20 0 empty empty Stop 0 -6 0 8 -258699 -1 -1 1 1; +#X obj 118 -3 inlet; +#X msg 147 48 1; +#X msg 115 48 0; +#X obj 118 21 moses 10; +#X obj 19 263 tabwrite~ \$0-oscillo; +#X obj 100 140 cnv 1 300 1 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 0 0 767 419 (subpatch) 0; +#X array \$0-oscillo 300 float 0; +#X coords 0 1 299 -1 300 80 1; +#X restore 100 100 graph; +#X obj 110 75 change; +#X obj 234 62 block~ 640 1 0.25; +#X connect 0 0 3 0; +#X connect 1 0 9 0; +#X connect 2 0 9 0; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 8 0; +#X connect 6 0 12 0; +#X connect 7 0 12 0; +#X connect 8 0 7 0; +#X connect 8 1 6 0; +#X connect 8 1 1 1; +#X connect 12 0 1 0; +#X coords 0 -1 1 1 300 80 1 100 100; +#X restore 97 617 pd oscillo; +#X obj 43 586 bq~ ---------; +#X text 41 17 bq~ is a biquad \, but with audio input for the coeficients. +Out out is :; +#X text 57 63 (it's not the same structure than biquad~ ! ); +#X text 326 584 <- drop in remplacement for bq~ \, using fexpr~; +#N canvas 0 98 595 201 bq~ 0; +#X obj 56 60 inlet~; +#X obj 192 58 inlet~; +#X obj 239 58 inlet~; +#X obj 319 59 inlet~; +#X obj 366 59 inlet~; +#X obj 412 58 inlet~; +#X text 323 37 b0; +#X obj 56 156 outlet~; +#X msg 67 84 clear; +#X text 188 34 a1; +#X obj 57 113 fexpr~ $x4[0]*$x1[0] + $x5[0]*$x1[-1] + $x6[0]*$x1[-2] +- $x2[0]*$y1[-1] - $x3[0]*$y1[-2]; +#X connect 0 0 10 0; +#X connect 1 0 10 1; +#X connect 2 0 10 2; +#X connect 3 0 10 3; +#X connect 4 0 10 4; +#X connect 5 0 10 5; +#X connect 8 0 10 0; +#X connect 10 0 7 0; +#X restore 254 583 pd bq~ ---; +#X connect 0 0 4 0; +#X connect 1 0 0 0; +#X connect 2 0 1 0; +#X connect 3 0 4 1; +#X connect 4 0 38 0; +#X connect 4 1 38 1; +#X connect 4 2 38 2; +#X connect 4 3 38 3; +#X connect 4 4 38 4; +#X connect 5 0 49 0; +#X connect 6 0 14 0; +#X connect 6 1 14 1; +#X connect 6 2 14 2; +#X connect 6 3 14 3; +#X connect 6 4 14 4; +#X connect 7 0 18 0; +#X connect 7 1 18 1; +#X connect 7 2 18 2; +#X connect 7 3 18 3; +#X connect 7 4 18 4; +#X connect 8 0 49 0; +#X connect 9 0 10 0; +#X connect 9 1 10 1; +#X connect 9 2 10 2; +#X connect 9 3 10 3; +#X connect 9 4 10 4; +#X connect 10 0 29 0; +#X connect 11 0 9 0; +#X connect 12 0 11 0; +#X connect 13 0 9 1; +#X connect 14 0 29 0; +#X connect 15 0 6 0; +#X connect 16 0 15 0; +#X connect 17 0 6 1; +#X connect 18 0 29 0; +#X connect 19 0 7 0; +#X connect 20 0 19 0; +#X connect 21 0 7 1; +#X connect 22 0 29 0; +#X connect 23 0 26 0; +#X connect 24 0 23 0; +#X connect 25 0 26 1; +#X connect 26 0 22 0; +#X connect 26 1 22 1; +#X connect 26 2 22 2; +#X connect 26 3 22 3; +#X connect 26 4 22 4; +#X connect 27 0 5 0; +#X connect 29 0 47 0; +#X connect 30 0 34 0; +#X connect 31 0 35 0; +#X connect 32 0 31 0; +#X connect 33 0 35 1; +#X connect 34 0 29 0; +#X connect 35 0 30 0; +#X connect 35 1 30 1; +#X connect 35 2 30 2; +#X connect 35 3 30 3; +#X connect 35 4 30 4; +#X connect 36 0 35 2; +#X connect 37 0 28 0; +#X connect 37 0 28 1; +#X connect 38 0 34 0; +#X connect 39 0 44 0; +#X connect 40 0 39 0; +#X connect 41 0 40 0; +#X connect 42 0 44 1; +#X connect 43 0 34 0; +#X connect 44 0 43 0; +#X connect 44 1 43 1; +#X connect 44 2 43 2; +#X connect 44 3 43 3; +#X connect 44 4 43 4; +#X connect 46 0 49 1; +#X connect 46 1 49 2; +#X connect 46 2 49 3; +#X connect 46 3 49 4; +#X connect 46 4 49 5; +#X connect 47 0 46 0; +#X connect 47 1 46 1; +#X connect 47 2 46 2; +#X connect 47 3 46 3; +#X connect 47 4 46 4; +#X connect 49 0 48 0; +#X connect 49 0 37 0; diff --git a/biquad/bq~.c b/biquad/bq~.c new file mode 100644 index 0000000..d8a70b4 --- /dev/null +++ b/biquad/bq~.c @@ -0,0 +1,112 @@ +/* Copyright (c) 1997-1999 Miller Puckette. +* For information on usage and redistribution, and for a DISCLAIMER OF ALL +* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ + +// modification of this code by cyrille henry in order to change the biquad topology and add audio inlet for filter coefs + +#include "m_pd.h" +#include <math.h> + +/* ---------------- bq~ - raw bq filter ----------------- */ + +typedef struct bqctl +{ + t_sample c_x1; + t_sample c_x2; + t_sample c_y1; + t_sample c_y2; +} t_bqctl; + +typedef struct bq_tilde +{ + t_object x_obj; + t_float x_f; + t_bqctl x_cspace; + t_bqctl *x_ctl; +} t_bq_tilde; + +t_class *bq_tilde_class; + +static void *bq_tilde_new(t_symbol *s, int argc, t_atom *argv) +{ + t_bq_tilde *x = (t_bq_tilde *)pd_new(bq_tilde_class); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); + inlet_new(&x->x_obj, &x->x_obj.ob_pd, &s_signal, &s_signal); + outlet_new(&x->x_obj, &s_signal); + x->x_ctl = &x->x_cspace; + x->x_cspace.c_x1 = x->x_cspace.c_x2 = 0; + x->x_cspace.c_y1 = x->x_cspace.c_y2 = 0; + x->x_f = 0; + return (x); +} + +static t_int *bq_tilde_perform(t_int *w) +{ + t_sample *in = (t_sample *)(w[1]); + t_sample *ina1 = (t_sample *)(w[2]); + t_sample *ina2 = (t_sample *)(w[3]); + t_sample *inb1 = (t_sample *)(w[4]); + t_sample *inb2 = (t_sample *)(w[5]); + t_sample *inb3 = (t_sample *)(w[6]); + t_sample *out = (t_sample *)(w[7]); + t_bqctl *c = (t_bqctl *)(w[8]); + int n = (t_int)(w[9]); + int i; + t_sample last_in = c->c_x1; + t_sample prev_in = c->c_x2; + t_sample last_out = c->c_y1; + t_sample prev_out = c->c_y2; + + for (i = 0; i < n; i++) + { + t_sample output = *inb1++ * *in + *inb2++ * last_in + *inb3++ * prev_in - *ina1++ * last_out - *ina2++ * prev_out; +// if (PD_BIGORSMALL(output)) +// output = 0; i don't understnd why it did not compile with this 2 lines. +// should be fixed latter if denormal is a problem + *out++ = output; + prev_in = last_in; + prev_out = last_out; + last_out = output; + last_in = *in++; + } + c->c_x1 = last_in; + c->c_x2 = prev_in; + c->c_y1 = last_out; + c->c_y2 = prev_out; + + return (w+10); +} + +static void bq_tilde_set(t_bq_tilde *x, t_symbol *s, int argc, t_atom *argv) +{ + t_bqctl *c = x->x_ctl; + c->c_x1 = atom_getfloatarg(0, argc, argv); + c->c_x2 = atom_getfloatarg(1, argc, argv); + c->c_y1 = atom_getfloatarg(2, argc, argv); + c->c_y2 = atom_getfloatarg(3, argc, argv); +} + +static void bq_tilde_dsp(t_bq_tilde *x, t_signal **sp) +{ + dsp_add(bq_tilde_perform, 9, + sp[0]->s_vec, sp[1]->s_vec, sp[2]->s_vec, sp[3]->s_vec, sp[4]->s_vec, + sp[5]->s_vec, sp[6]->s_vec, x->x_ctl, sp[0]->s_n); + +} + +void bq_tilde_setup(void) +{ + bq_tilde_class = class_new(gensym("bq~"), (t_newmethod)bq_tilde_new, + 0, sizeof(t_bq_tilde), 0, A_GIMME, 0); + CLASS_MAINSIGNALIN(bq_tilde_class, t_bq_tilde, x_f); + class_addmethod(bq_tilde_class, (t_method)bq_tilde_dsp, gensym("dsp"), 0); + class_addmethod(bq_tilde_class, (t_method)bq_tilde_set, gensym("set"), + A_GIMME, 0); + class_addmethod(bq_tilde_class, (t_method)bq_tilde_set, gensym("clear"), + A_GIMME, 0); +} + + diff --git a/biquad/makefile b/biquad/makefile new file mode 100755 index 0000000..49835d2 --- /dev/null +++ b/biquad/makefile @@ -0,0 +1,97 @@ +current:
+ echo make pd_linux, pd_nt, pd_irix5, or pd_irix6
+
+clean: ; rm -f *.pd_linux *.o
+
+# ----------------------- NT -----------------------
+
+pd_nt: bq~.dll
+
+.SUFFIXES: .dll
+
+PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
+VC="C:\Program Files\Microsoft Visual Studio\Vc98"
+
+PDNTINCLUDE = /I. /I$(VC)\include /I..\..\..\pd\src\
+
+PDNTLDIR = $(VC)\lib
+PDNTLIB = $(PDNTLDIR)\libc.lib \
+ $(PDNTLDIR)\oldnames.lib \
+ $(PDNTLDIR)\kernel32.lib \
+ \pds\win32\pd36\bin\pd.lib
+
+.c.dll:
+ cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+ link /dll /export:$*_setup $*.obj $(PDNTLIB)
+
+# ----------------------- IRIX 5.x -----------------------
+
+pd_irix5: bq~.pd_irix5
+
+.SUFFIXES: .pd_irix5
+
+SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2
+
+
+SGIINCLUDE = -I../../../pd/src/
+
+.c.pd_irix5:
+ cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
+ ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
+ rm $*.o
+
+# ----------------------- IRIX 6.x -----------------------
+
+pd_irix6: bq~.pd_irix6
+
+.SUFFIXES: .pd_irix6
+
+SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \
+ -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
+ -Ofast=ip32
+
+.c.pd_irix6:
+ cc $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c
+ ld -IPA -n32 -shared -rdata_shared -o $*.pd_irix6 $*.o
+ rm $*.o
+
+# ----------------------- LINUX i386 -----------------------
+
+pd_linux: bq~.pd_linux
+
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
+ -Wall -W -Wshadow -Wstrict-prototypes -Werror \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+LINUXINCLUDE = -I../../../pd/src/
+
+.c.pd_linux:
+ cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c
+ ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
+ strip --strip-unneeded $*.pd_linux
+ rm $*.o
+
+# ----------------------- Mac OS X (Darwin) -----------------------
+
+
+pd_darwin: bq~.pd_darwin
+
+.SUFFIXES: .pd_darwin
+
+DARWINCFLAGS = -DPD -DUNIX -DMACOSX -O2 \
+ -Wall -W -Wshadow -Wstrict-prototypes \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+# where is your m_pd.h ???
+DARWININCLUDE = -I/. -I../../../pd/src -I../../../pd/obj
+
+.c.pd_darwin:
+ cc $(DARWINCFLAGS) $(DARWININCLUDE) -o $*.o -c $*.c
+ cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o
+ rm -f $*.o ../$*.pd_darwin
+ ln -s $*/$*.pd_darwin ..
+
+
+
|