#N canvas 340 62 738 600 10; #X obj 50 202 list split 2; #X obj 191 264 list split 3; #X obj 212 331 unpack 0 1 2; #X floatatom 154 388 5 0 0 0 - - -; #X obj 154 408 f; #X obj 193 387 + 1; #X msg 154 367 0; #X obj 50 266 list split 1; #X obj 60 307 f; #X floatatom 87 308 5 0 0 0 - - -; #X obj 50 286 select partials-count; #X obj 60 353 f; #X floatatom 87 354 5 0 0 0 - - -; #X obj 50 332 select frame-count; #X obj 50 172 textfile; #X msg 50 102 rewind; #X obj 72 147 until; #X obj 72 127 bang; #X text 110 147 keep sending bangs until we hit EOF; #X text 107 172 read a line; #X text 137 425 time counter; #X text 56 250 header vars; #X obj 250 309 list; #X text 207 346 index freq mag; #X obj 191 286 trigger b b l; #X obj 84 227 trigger l b; #X obj 266 369 f; #X obj 262 419 f; #X msg 50 55 read \$1 cr; #X msg 157 488 \; frqarray resize 0 \; frqarray resize \$1 \; magarray resize 0 \; magarray resize \$1 \;; #X obj 266 393 tabwrite magarray; #X obj 262 444 tabwrite frqarray; #X obj 157 465 *; #X text 131 558 Size arrays as npartials x frames; #X obj 212 362 *; #X text 357 466 values are written to entry index x frame-count + time ; #X obj 225 387 +; #X text 139 199 First two items are either header fields or time and harmonic count; #X text 293 307 iterate down list processing three items at a time ; #X obj 50 33 inlet; #X obj 57 416 outlet; #X obj 87 459 outlet; #X text 41 434 partials-count; #X text 77 477 frame-count; #X obj 50 78 t b a; #X obj 283 176 s fileread; #X text 350 177 tell rest of patch that new file is read; #X text 99 31 input is name of SPEAR analysis file to read; #X text 130 53 instruct [textfile] to read it in \, with carriage return line breaks; #X text 421 521 loadspearfile.pd; #X text 422 551 2013-02-20 Dan Ellis dpwe@ee.columbia.edu; #X text 422 536 Read in data file written by SPEAR; #X text 202 246 Remaining items in data lines are triples of ; #X connect 0 0 7 0; #X connect 0 1 25 0; #X connect 1 0 24 0; #X connect 1 1 22 1; #X connect 2 0 34 0; #X connect 2 1 27 1; #X connect 2 2 26 1; #X connect 3 0 4 1; #X connect 3 0 36 1; #X connect 4 0 5 0; #X connect 5 0 3 0; #X connect 6 0 3 0; #X connect 7 0 10 0; #X connect 7 0 13 0; #X connect 7 1 8 1; #X connect 7 1 11 1; #X connect 8 0 9 0; #X connect 9 0 32 1; #X connect 9 0 40 0; #X connect 10 0 8 0; #X connect 11 0 12 0; #X connect 12 0 32 0; #X connect 12 0 34 1; #X connect 12 0 41 0; #X connect 13 0 11 0; #X connect 13 0 6 0; #X connect 14 0 0 0; #X connect 14 1 16 1; #X connect 14 1 45 0; #X connect 15 0 14 0; #X connect 15 0 17 0; #X connect 16 0 14 0; #X connect 17 0 16 0; #X connect 22 0 1 0; #X connect 24 0 22 0; #X connect 24 1 26 0; #X connect 24 1 27 0; #X connect 24 2 2 0; #X connect 25 0 1 0; #X connect 25 1 4 0; #X connect 26 0 30 0; #X connect 27 0 31 0; #X connect 28 0 44 0; #X connect 32 0 29 0; #X connect 34 0 36 0; #X connect 36 0 31 1; #X connect 36 0 30 1; #X connect 39 0 28 0; #X connect 44 0 15 0; #X connect 44 1 14 0;