-
RafaSubia
Hello everybody, I´ve been programing in PD for a year now, I programend in MAX/MSP for 5 years and I made a Spectral Cross Over with pfft~, however, I have been trying to port this patch to PD, the problem is that the fft~ object in PD does not have the third outlet that gives me the bin number activity as in Max/MSP.
Is there anyway to find out when a bin has a"activity" in it?
This is what I´ve made so far.#N canvas 659 22 394 380 10; #X declare -lib iemmatrix; #X declare -lib cyclone; #X obj -648 -457 osc~ 400; #X floatatom -646 -479 10 0 0 0 - - -; #X obj -581 -457 osc~ 400; #X floatatom -581 -480 10 0 0 0 - - -; #X obj -522 -322 sfplay; #X obj -522 -366 openpanel; #X msg -522 -343 open \$1 l; #X obj -448 -362 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg -450 -342 start; #X msg -406 -343 rewind; #N canvas 31 71 691 458 Xover 0; #X obj -423 -473 inlet~; #N canvas 35 66 592 433 Hann-window 0; #N canvas 0 22 450 300 (subpatch) 0; #X array \$0-hann 511 float 0; #X coords 0 1 510 0 200 120 1; #X restore 293 249 graph; #X msg 171 263 0; #X obj 65 312 osc~; #X obj 65 264 samplerate~; #X obj 65 335 *~ -0.5; #X obj 65 358 +~ 0.5; #X text 279 241 1; #X text 272 359 0; #X text 288 372 0; #X obj 57 241 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 336 221 Hann window; #X text 113 310 period 512; #X text 90 215 recalculate Hann; #X text 125 230 window table; #X obj 57 146 loadbang; #X msg 79 179 \; pd dsp 1; #X text 40 27 The Hann window is now recomputed on 'loadbang' to make the file smaller (it doesn't have to be saved with the array.); #X text 474 375 511; #X obj 57 383 tabwrite~ \$0-hann; #X obj 65 289 / 512; #X connect 1 0 2 1; #X connect 2 0 4 0; #X connect 3 0 19 0; #X connect 4 0 5 0; #X connect 5 0 18 0; #X connect 9 0 3 0; #X connect 9 0 1 0; #X connect 9 0 18 0; #X connect 14 0 9 0; #X connect 14 0 15 0; #X connect 19 0 2 0; #X restore -79 -412 pd Hann-window; #X obj -79 -434 declare -lib iemmatrix; #X obj -230 -438 samplerate~; #X floatatom -230 -416 5 0 0 0 - - -; #X obj -230 -461 loadbang; #X obj -258 -454 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #N canvas 0 22 450 300 sigtocontr 0; #X obj 76 161 snapshot~; #X obj 109 133 metro 10; #X obj 109 105 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 32 107 inlet~; #X floatatom 134 104 10 0 0 0 - - -; #X obj 76 190 outlet; #X connect 0 0 4 0; #X connect 0 0 5 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X coords 0 -1 1 1 100 25 2 100 100; #X restore -289 -130 pd sigtocontr; #X floatatom -230 -369 15 0 0 0 - - -; #X obj -423 -394 rfft~; #X obj -230 -394 / 1024; #X text -146 -395 fft size; #X text -234 -350 freq. de analisis; #X floatatom -181 -395 5 0 0 0 - - -; #X obj -79 -456 declare -lib cyclone; #X obj -364 -367 cartopol~; #X obj -288 -209 sig~; #X obj -288 -231 / 43.0664; #X obj -289 -159 clip~ 0 1; #X obj -288 -180 tabread~ \$0-frecuencias; #X obj -364 -291 tabsend~ \$0-frecuencias; #X obj -423 -417 hip~ 20; #N canvas 0 22 450 300 sigtocontr 0; #X obj 76 161 snapshot~; #X obj 109 133 metro 10; #X obj 109 105 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 32 107 inlet~; #X floatatom 134 104 5 0 0 0 - - -; #X obj 76 190 outlet; #X connect 0 0 4 0; #X connect 0 0 5 0; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 0 0; #X coords 0 -1 1 1 85 25 2 100 100; #X restore -119 -136 pd sigtocontr; #X obj -116 -208 sig~; #X obj -116 -230 / 43.0664; #X obj -117 -158 clip~ 0 1; #X obj -116 -179 tabread~ \$0-frecuencias; #X obj -71 -349 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj -82 -390 table \$0-frecuencias 512; #X obj -71 -329 switch~ 4098 4 2; #X obj -71 -368 loadbang; #X obj -289 -268 inlet; #X obj -119 -270 inlet; #X obj -289 -62 outlet; #X obj -119 -63 outlet; #X obj -364 -338 /~ 256; #X obj -119 -83 > 0.1; #X obj -289 -83 >= 0.05; #X connect 0 0 21 0; #X connect 3 0 4 0; #X connect 4 0 10 0; #X connect 5 0 3 0; #X connect 6 0 3 0; #X connect 7 0 37 0; #X connect 9 0 15 0; #X connect 9 1 15 1; #X connect 10 0 8 0; #X connect 13 0 10 1; #X connect 15 0 35 0; #X connect 16 0 19 0; #X connect 17 0 16 0; #X connect 18 0 7 0; #X connect 19 0 18 0; #X connect 21 0 9 0; #X connect 22 0 36 0; #X connect 23 0 26 0; #X connect 24 0 23 0; #X connect 25 0 22 0; #X connect 26 0 25 0; #X connect 27 0 29 0; #X connect 30 0 27 0; #X connect 31 0 17 0; #X connect 32 0 24 0; #X connect 35 0 20 0; #X connect 36 0 34 0; #X connect 37 0 33 0; #X restore -469 -224 pd Xover; #X obj -468 -189 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj -424 -189 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X floatatom -447 -277 5 0 0 0 - - -; #X floatatom -406 -277 5 0 0 0 - - -; #X obj -535 -162 dac~; #X msg -353 -344 close; #X connect 0 0 10 0; #X connect 1 0 0 0; #X connect 2 0 10 0; #X connect 3 0 2 0; #X connect 4 0 10 0; #X connect 4 0 15 0; #X connect 4 0 15 1; #X connect 5 0 6 0; #X connect 6 0 4 0; #X connect 7 0 5 0; #X connect 8 0 4 0; #X connect 9 0 4 0; #X connect 10 0 11 0; #X connect 10 1 12 0; #X connect 13 0 10 1; #X connect 14 0 10 2; #X connect 16 0 4 0; .