#N canvas 61 8 827 712 10;
#X msg 385 151 bang;
#X obj 31 405 pack 0 100;
#X obj 31 433 line~;
#X obj 31 377 dbtorms;
#X msg 106 634 \; array5 resize 44102;
#X obj 142 361 phasor~;
#N canvas 207 8 808 706 fft 0;
#X obj 75 79 inlet~;
#X obj 158 126 print~;
#X msg 161 83 bang;
#X obj 75 122 rfft~;
#X graph graph3 0 -1 4096 1 366 326 766 26;
#X array array3 4096 float;
#X pop;
#X graph graph4 0 -1 4096 1 366 633 766 333;
#X array array4 4096 float;
#X pop;
#X obj 11 218 tabsend~ array3;
#X obj 59 186 tabsend~ array4;
#X msg 43 289 \; array3 resize 4096 \; array4 resize 4096;
#X obj 73 45 block~ 4096 1;
#X connect 0 0 1 0;
#X connect 0 0 3 0;
#X connect 2 0 1 0;
#X connect 3 0 6 0;
#X connect 3 1 7 0;
#X restore 142 473 pd fft;
#X graph graph1 0 -1 44102 1 352 678 752 378;
#X array array5 44102 float;
#X pop;
#X obj 142 333 sig~ 1;
#X obj 183 389 sig~ 44100;
#X obj 142 389 *~;
#X obj 183 417 sig~ 1;
#X obj 142 417 +~;
#X obj 142 445 tabread4~ array5;
#X obj 31 461 *~;
#X obj 31 489 hip~ 5;
#X obj 31 531 dac~;
#X obj 392 177 adc~;
#X obj 384 210 tabwrite~ array5;
#N canvas 204 36 715 434 analysis 0;
#X obj 259 227 pique;
#X obj 242 44 inlet;
#X msg 243 80 bang;
#X obj 324 61 r snapshot;
#X msg 259 199 4096 array3 array4 50;
#X obj 113 316 print;
#X obj 242 121 t b b b;
#X obj 75 206 s done-analysis;
#X obj 480 190 s start-analysis;
#X obj 274 272 s found-peak;
#X obj 178 287 r loud;
#X obj 115 286 spigot;
#X connect 0 0 9 0;
#X connect 0 0 11 0;
#X connect 1 0 2 0;
#X connect 2 0 6 0;
#X connect 3 0 2 0;
#X connect 4 0 0 0;
#X connect 6 0 7 0;
#X connect 6 1 4 0;
#X connect 6 2 8 0;
#X connect 10 0 11 1;
#X connect 11 0 5 0;
#X restore 28 289 pd analysis;
#X obj 31 349 r loop-amp;
#X msg 28 261 snapshot;
#X text 17 103 click here first;
#X text 28 233 analysis;
#X text 101 554 (change this and send;
#X text 101 582 it if you want to change;
#X text 101 610 the length of the sample);
#N canvas 219 66 884 397 peak-saver 0;
#X floatatom 835 365;
#X floatatom 745 363;
#X floatatom 659 359;
#X floatatom 569 357;
#X obj 478 295 pointer;
#X obj 417 177 pointer;
#X msg 416 147 traverse peak-list \, bang;
#X msg 440 71 bang;
#X obj 167 286 rmstodb;
#X obj 12 287 * 0.1;
#X obj 166 315 * -3;
#X msg 471 102 \; peak-list clear;
#X floatatom 489 353;
#X obj 415 42 r start-analysis;
#X obj 416 105 t b b;
#X msg 480 237 traverse peak-list \, next;
#X msg 34 105 50 60 70;
#X obj 33 141 append peak-template x y amp;
#X msg 501 265 next;
#X obj 473 325 get peak-template x y amp ampreal ampimag;
#X obj 10 345 append peak-template x y amp ampreal ampimag;
#X obj 137 197 r found-peak;
#X obj 138 230 unpack 0 0 0 0 0;
#X msg 89 287 330;
#X connect 4 0 19 0;
#X connect 5 0 17 3;
#X connect 5 0 20 5;
#X connect 6 0 5 0;
#X connect 7 0 14 0;
#X connect 8 0 10 0;
#X connect 9 0 20 0;
#X connect 10 0 20 2;
#X connect 13 0 14 0;
#X connect 14 0 6 0;
#X connect 14 1 11 0;
#X connect 15 0 4 0;
#X connect 16 0 17 0;
#X connect 18 0 4 0;
#X connect 19 0 12 0;
#X connect 19 1 3 0;
#X connect 19 2 2 0;
#X connect 19 3 1 0;
#X connect 19 4 0 0;
#X connect 21 0 22 0;
#X connect 22 1 9 0;
#X connect 22 2 23 0;
#X connect 22 2 8 0;
#X connect 22 3 20 3;
#X connect 22 4 20 4;
#X connect 23 0 20 1;
#X restore 626 214 pd peak-saver;
#N canvas 91 401 600 394 peak-template 0;
#X obj 263 51 field x float;
#X obj 262 90 field y float;
#X obj 261 130 field amp float;
#X obj 113 281 polygon 3 3 0 0 0 amp;
#X obj 262 168 field ampreal float;
#X obj 263 200 field ampimag float;
#X restore 626 242 pd peak-template;
#N canvas 0 0 600 390 peak-list 1;
#X restore 626 270 pd peak-list;
#X msg 7 189 \; array5 read16 ../sound/bell.aiff 62 b;
#X msg 48 126 \; pd dsp 1;
#X floatatom 204 270;
#X obj 204 298 s loud;
#X floatatom 692 77;
#N canvas 194 37 730 728 output 0;
#X obj 91 256 t b;
#X obj 90 181 f;
#X obj 78 83 inlet;
#X text 86 54 mute;
#X obj 91 287 f;
#X msg 184 276 0;
#X msg 81 120 bang;
#X obj 91 222 moses 1;
#X obj 199 39 r loop-amp;
#X obj 92 337 s loop-amp;
#X obj 184 211 t b f;
#X obj 109 543 outlet;
#X msg 108 503 set \$1 ;
#X obj 109 470 r loop-amp;
#X connect 0 0 4 0;
#X connect 1 0 7 0;
#X connect 2 0 6 0;
#X connect 4 0 9 0;
#X connect 5 0 9 0;
#X connect 6 0 1 0;
#X connect 7 0 0 0;
#X connect 7 1 10 0;
#X connect 8 0 1 1;
#X connect 10 0 5 0;
#X connect 10 1 4 1;
#X connect 12 0 11 0;
#X connect 13 0 12 0;
#X restore 692 49 pd output;
#X obj 692 108 s loop-amp;
#X msg 692 21 mute;
#X text 735 81 AMPLITUDE;
#X text 385 123 live sample;
#X text 68 167 read a sound to analyze;
#X text 202 225 print out;
#X text 204 242 peak list;
#X text 274 4 SPECTRAL SNAPSHOTS.;
#X text 127 18 This patch reads a soundfile or records a live sound. When you click on "snapshot" the peak-list window shows a list of the sinusoidal peaks that were found at that instant in the sound. YOu can also ask for the peak lists to eb printed out.;
#X connect 0 0 18 0;
#X connect 1 0 2 0;
#X connect 2 0 14 0;
#X connect 3 0 1 0;
#X connect 5 0 10 0;
#X connect 8 0 5 0;
#X connect 9 0 10 1;
#X connect 10 0 12 0;
#X connect 11 0 12 1;
#X connect 12 0 13 0;
#X connect 13 0 14 1;
#X connect 13 0 6 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 15 0 16 1;
#X connect 17 0 18 0;
#X connect 20 0 3 0;
#X connect 21 0 19 0;
#X connect 32 0 33 0;
#X connect 34 0 36 0;
#X connect 35 0 34 0;
#X connect 37 0 35 0;
