#N canvas 0 0 1255 716 10; #X obj 36 -427 soundfiler; #N canvas 530 357 857 419 (subpatch) 0; #X array fft 62079 float 2; #X coords 0 100 62079 -100 200 140 1; #X restore 323 -201 graph; #N canvas 0 0 450 300 (subpatch) 0; #X array abs_fft 62079 float 2; #X coords 0 100 62079 -1 200 140 1; #X restore 544 -200 graph; #X floatatom 36 -399 5 0 0 0 - - -; #X text 77 -399 <-- sample length; #N canvas 5 49 450 300 (subpatch) 0; #X array voice 62079 float 2; #X coords 0 1 62079 -1 200 140 1; #X restore 482 -490 graph; #X msg 36 -477 read -resize voice.wav voice; #X msg 47 -455 read -resize voice2.wav voice; #X text 33 -515 load the wav file in the array voice; #X text 244 -481 <-- sound 1; #X text 246 -455 <-- sound 2; #X text 766 -408 save the contents of the array in a .txt file; #X obj 150 -119 tabwrite~ fft; #X obj 150 -199 tabplay~ voice; #X obj 36 -243 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 150 -147 fft~; #X obj 121 -101 abs~; #X obj 121 -74 tabwrite~ abs_fft; #N canvas 0 0 450 300 (subpatch) 0; #X array inputDB 62079 float 2; #X coords 0 20 62079 -80 200 140 1; #X restore 761 -200 graph; #X obj 36 -278 change; #X text 157 -565 <-- The analysis size is blocks of 1024 samples (about 23ms @ 44.1 kHz) with 50% overlap; #X obj 36 -563 block~ 1024 2 1; #X msg 97 -370 \; fft resize \$1; #X msg 98 -291 \; abs_fft resize \$1; #X text 194 -366 <-- resise the arrays; #X msg 767 -494 \; pd dsp 1; #X msg 768 -453 \; pd dsp 0; #X text 845 -490 <-- sound ON; #X text 847 -449 <-- sound OFF; #X msg 770 -381 \; fft write fft.txt \; voice write voice.txt \; abs_fft write abs_fft.txt \; logE write logE.txt \;; #X obj 151 -173 hanning~; #X text 584 -508 <-- input signal; #X text 378 -219 <-- Fourier of the input; #X text 611 -219 <-- Enegy of thr input; #X obj 76 -39 expr~ 10*log($v1)/log(10); #X msg 98 -330 \; inputDB resize \$1; #X obj 69 -15 tabwrite~ inputDB; #X text 100 -56 convert signal energy to dB; #X connect 0 0 3 0; #X connect 3 0 19 0; #X connect 3 0 22 0; #X connect 3 0 23 0; #X connect 3 0 35 0; #X connect 6 0 0 0; #X connect 7 0 0 0; #X connect 13 0 30 0; #X connect 14 0 13 0; #X connect 14 0 12 0; #X connect 14 0 17 0; #X connect 14 0 36 0; #X connect 15 0 16 0; #X connect 15 0 12 0; #X connect 16 0 17 0; #X connect 16 0 34 0; #X connect 19 0 14 0; #X connect 30 0 15 0; #X connect 34 0 36 0;