XML Feeds

.

[maxmsp] FFT Question --- fftin~ + index~ (Freeze Patch by 'luke')

kassian kassian at gmx.net
Tue Jul 3 01:47:36 MDT 2007


hi,

yesterday i found a FFT-Freeze-Patch in this forum, made by a certain luke, , but since iŽm really new to FFT i donŽt quite understand yet how it works. 
iŽll post it below.

what i donŽt understand is, 
what comes out the rightmost oulet of the fftin~ object? 
it says FFT Bin index, but it is a constant signal, it doesnŽt count from zero to FFT-size, but it is often used this way (f.e. together with poke~ it is used for indexing, .... or in this freeze-patch below, it is used together with sig~ to read out the index~ object),
and this is already my 2. question, how does the reading of the index~ object work in this case?

thanks for any help!!
kassian


and here is the patch by luke:


save this patcher as a file called freeze~ and stick it in your search path:

max v2;
#N vpatcher 42 56 756 532;
#P comment 489 263 100 196617 � oscillate current spectral frame.;
#P newex 119 86 25 196617 in 1;
#P newex 476 425 49 196617 fftout~ 1;
#P newex 476 383 51 196617 poltocar~;
#P newex 517 350 69 196617 frameaccum~;
#P newex 517 323 79 196617 index~ freeze 2;
#P newex 422 323 79 196617 index~ freeze 1;
#P newex 423 288 27 196617 +~;
#P newex 440 256 42 196617 *~ 512;
#P newex 488 219 43 196617 fftinfo~;
#P newex 440 219 39 196617 sig~ 1.;
#P newex 218 212 85 196617 record~ freeze 2;
#P newex 126 267 110 196617 buffer~ freeze 1000 2;
#P newex 259 176 62 196617 phasewrap~;
#P newex 259 150 63 196617 framedelta~;
#P newex 218 121 51 196617 cartopol~;
#P newex 218 87 93 196617 fftin~ 1;
#P comment 311 214 100 196617 � record spectral frame when a '1' is sent into the inlet.;
#P connect 1 0 2 0;
#P fasten 16 0 6 0 124 189 223 189;
#P connect 2 0 6 0;
#P fasten 4 0 6 1 264 202 248 202;
#P connect 1 1 2 1;
#P connect 2 1 3 0;
#P connect 3 0 4 0;
#P connect 10 0 11 0;
#P fasten 1 2 10 0 305 139 428 139;
#P connect 7 0 9 0;
#P connect 9 0 10 1;
#P fasten 8 1 9 1 509 244 477 244;
#P fasten 11 0 14 0 427 361 481 361;
#P connect 14 0 15 0;
#P fasten 14 1 15 1 522 412 520 412;
#P fasten 10 0 12 0 428 314 522 314;
#P connect 12 0 13 0;
#P connect 13 0 14 1;
#P pop;

here's an example wrapper patch for freeze:

max v2;
#N vpatcher 274 222 602 494;
#P comment 14 209 62 196617 � start/stop audio.;
#P comment 27 40 50 196617 � capture a frame.;
#P comment 23 141 67 196617 � dry output.;
#P message 50 67 14 196617 1;
#P toggle 52 182 15 0;
#P newex 88 212 29 196617 dac~;
#P flonum 105 140 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 88 165 27 196617 *~;
#P flonum 161 140 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 144 165 27 196617 *~;
#P toggle 117 53 15 0;
#P message 157 53 28 196617 open;
#N sfplay~ 1 40320 0 ;
#P newobj 144 80 42 196617 sfplay~;
#P newex 144 116 105 196617 pfft~ freeze~ 1024 2;
#P comment 200 141 108 196617 � freeze-frame output.;
#P comment 188 53 74 196617 � open and play a sound in.;
#P fasten 3 0 8 0 149 111 93 111;
#P fasten 8 0 10 0 93 197 93 197;
#P fasten 11 0 10 0 57 204 93 204;
#P fasten 6 0 10 0 149 197 93 197;
#P connect 9 0 8 1;
#P fasten 6 0 10 1 149 197 112 197;
#P fasten 8 0 10 1 93 197 112 197;
#P fasten 4 0 3 0 162 74 149 74;
#P fasten 5 0 3 0 122 74 149 74;
#P fasten 12 0 2 0 55 106 149 106;
#P connect 3 0 2 0;
#P connect 2 0 6 0;
#P connect 7 0 6 1;
#P pop;




More information about the maxmsp mailing list