#N canvas 220 297 490 396 12;
#X floatatom 232 118 0 0 500 0 - squelch-set -;
#X obj 232 142 s squelch;
#N canvas 0 110 581 470 hann-window 0;
#N canvas 0 0 450 300 graph1 0;
#X array hanning 1024 float 0;
#X coords 0 1 1023 0 300 100 1;
#X restore 82 311 graph;
#X obj 378 165 osc~;
#X obj 378 190 *~ -0.5;
#X obj 378 214 +~ 0.5;
#X obj 37 88 r window-size;
#X obj 38 173 /;
#X obj 127 142 samplerate~;
#X obj 38 251 s window-sec;
#X obj 177 204 swap;
#X obj 177 228 /;
#X obj 177 252 s window-hz;
#X obj 49 201 * 1000;
#X obj 49 228 s window-msec;
#X obj 38 115 t f b f;
#X msg 173 92 resize \$1;
#X obj 330 105 r window-hz;
#X msg 382 130 0;
#X obj 330 131 t f b;
#X text 15 8 calculate Hann window table (variable window size) and
constants window-hz (fundamental frequency of analysis) \, window-sec
and window-msec (analysis window size in seconds and msec).;
#X obj 173 116 s hanning;
#X obj 331 247 tabwrite~ hanning;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 20 0;
#X connect 4 0 13 0;
#X connect 5 0 7 0;
#X connect 5 0 11 0;
#X connect 6 0 5 1;
#X connect 6 0 8 1;
#X connect 8 0 9 0;
#X connect 8 1 9 1;
#X connect 9 0 10 0;
#X connect 11 0 12 0;
#X connect 13 0 5 0;
#X connect 13 0 8 0;
#X connect 13 1 6 0;
#X connect 13 2 14 0;
#X connect 14 0 19 0;
#X connect 15 0 17 0;
#X connect 16 0 1 1;
#X connect 17 0 1 0;
#X connect 17 1 16 0;
#X connect 17 1 20 0;
#X restore 224 234 pd hann-window;
#X obj 19 144 readsf~ 2;
#X msg 19 115 open musik1.wav \, 1;
#X obj 19 218 *~;
#X floatatom 71 200 5 0 0 0 - - -;
#N canvas 685 304 568 680 fft-analys2 1;
#X obj 111 451 *~;
#X obj 76 450 *~;
#X obj 76 114 *~;
#X obj 75 55 inlet~;
#X obj 76 137 rfft~;
#X obj 76 570 *~;
#X obj 166 175 *~;
#X obj 76 514 rifft~;
#X obj 76 593 outlet~;
#X obj 132 175 *~;
#X obj 132 198 +~;
#X obj 70 21 block~ 1024 4;
#X obj 132 349 clip~;
#X obj 168 292 r squelch;
#X obj 167 315 expr 0.01*$f1*$f1;
#X obj 133 411 *~ 0.00065;
#X obj 132 223 +~ 1e-020;
#X obj 131 260 q8_rsqrt~;
#X obj 94 542 tabreceive~ hanning;
#X obj 94 86 tabreceive~ hanning;
#X text 230 209 Magnitude calculation;
#X text 278 284 proper calculation of;
#X text 342 302 the threshold;
#X text 185 348 everything above the threshold is now clipped;
#X text 228 413 normalization;
#X text 148 450 multiplication of the clipped magnitudes with the original
FFT values \, as with a filter;
#X connect 0 0 7 1;
#X connect 1 0 7 0;
#X connect 2 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 9 0;
#X connect 4 0 9 1;
#X connect 4 0 1 0;
#X connect 4 1 6 0;
#X connect 4 1 6 1;
#X connect 4 1 0 0;
#X connect 5 0 8 0;
#X connect 6 0 10 1;
#X connect 7 0 5 0;
#X connect 9 0 10 0;
#X connect 10 0 16 0;
#X connect 12 0 15 0;
#X connect 13 0 14 0;
#X connect 14 0 12 2;
#X connect 15 0 0 1;
#X connect 15 0 1 1;
#X connect 16 0 17 0;
#X connect 17 0 12 0;
#X connect 18 0 5 1;
#X connect 19 0 2 1;
#X restore 18 171 pd fft-analys2;
#X obj 20 245 dac~;
#X text 267 117 squelch;
#X text 28 14 3.8.2.3. compressor;
#X text 22 70 try it with a piece;
#X text 20 90 of music;
#X text 230 90 compression level;
#X text 222 193 the Hanning calculation;
#X text 224 214 should be familiar...;
#X text 256 311 www.pd-tutorial.com;
#X text 262 286 Johannes Kreidler;
#X connect 0 0 1 0;
#X connect 3 0 7 0;
#X connect 4 0 3 0;
#X connect 5 0 8 0;
#X connect 5 0 8 1;
#X connect 6 0 5 1;
#X connect 7 0 5 0;
