14.partialtracer.pd 23.6 KB
Newer Older
1 2 3 4 5 6
#N struct peak-template float x float y float amp float ampreal float
ampimag float used;
#N struct trace-template float x float y float voiceno array bazoo
point-template;
#N struct point-template float y float amp;
#N canvas 110 46 913 627 10;
Miller Puckette's avatar
Miller Puckette committed
7
#X declare -path lib;
8
#X floatatom 777 94 0 0 100 0 - - -;
Miller Puckette's avatar
Miller Puckette committed
9 10 11 12 13 14
#N canvas 516 98 663 557 (subpatch) 0;
#X obj 103 108 outlet;
#X msg 101 80 set \$1;
#X obj 103 57 r osc-amp;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
15 16 17 18 19 20 21 22 23 24 25
#X restore 777 72 pd;
#X obj 777 120 s osc-amp;
#X obj 121 501 pack 0 100;
#X obj 122 523 line~;
#X obj 121 479 dbtorms;
#X obj 122 563 *~;
#X floatatom 827 265 0 0 0 0 - - -;
#X msg 668 289 0;
#X floatatom 737 244 0 0 0 0 - - -;
#X floatatom 838 310 0 0 0 0 - - -;
#X floatatom 647 94 0 0 110 0 - - -;
Miller Puckette's avatar
Miller Puckette committed
26 27 28 29 30 31
#N canvas 516 98 663 555 (subpatch) 0;
#X obj 103 108 outlet;
#X msg 101 80 set \$1;
#X obj 103 57 r grain-amp;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
32
#X restore 647 71 pd;
Miller Puckette's avatar
Miller Puckette committed
33 34 35 36 37
#N canvas 168 244 589 236 peak-template 0;
#X obj 81 52 filledpolygon 3 3 3 0 0 0 amp 0 0;
#X obj 74 10 struct peak-template float x float y float amp float ampreal
float ampimag float used;
#X restore 417 525 pd peak-template;
38 39 40
#N canvas 383 155 600 386 peak-list 0;
#X restore 308 457 pd peak-list;
#N canvas 74 242 745 526 trace-list 0;
41
#X coords 0 131.5 1 131.25 0 0 0;
42
#X restore 308 436 pd trace-list;
43
#N canvas 375 90 563 188 trace-template 0;
Miller Puckette's avatar
Miller Puckette committed
44 45 46 47 48 49
#X text 121 93 This template describes a pitch/amplitude trace. The
array "bazoo" holds the actual points. In this template \, y is always
0 and x is the starting location in pixels. There are 5 pixels per
point.;
#X obj 125 36 struct trace-template float x float y float voiceno array
bazoo point-template;
50
#X obj 121 72 plot bazoo 0 1 0 0 5;
Miller Puckette's avatar
Miller Puckette committed
51 52 53 54 55 56 57 58
#X restore 417 546 pd trace-template;
#N canvas 96 258 494 158 point-template 0;
#X text 127 56 This template describes a single point on a pitch trace
(cf. trace-template w describes the trace itself.);
#X text 127 89 "y" is the field that is shown on the graph \; it's
- 4 * pitch. You also get an "amp" field in dB \, which you can't see
as a plot (yet).;
#X obj 212 14 struct point-template float y float amp;
59
#X restore 417 567 pd point-template;
60 61 62 63 64
#X msg 604 456 bang;
#X obj 8 415 pack 0 100;
#X obj 8 439 line~;
#X obj 8 394 dbtorms;
#X floatatom 545 93 0 0 110 0 - - -;
Miller Puckette's avatar
Miller Puckette committed
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
#N canvas 194 37 730 722 output 0;
#X obj 295 76 t b f;
#X obj 286 100 +;
#X obj 515 207 f;
#X obj 532 165 f;
#X obj 359 210 f;
#X obj 83 179 t b;
#X obj 82 127 f;
#X obj 71 58 inlet;
#X text 78 37 mute;
#X obj 83 201 f;
#X msg 235 153 0;
#X msg 74 84 bang;
#X obj 83 155 moses 1;
#X obj 231 69 t b f;
#X obj 222 93 +;
#X obj 181 27 r loop-amp;
#X obj 395 26 r osc-amp;
#X obj 83 236 s loop-amp;
#X obj 359 235 s osc-amp;
#X obj 591 125 print;
#X obj 186 148 f;
#X obj 374 168 f;
#X obj 225 120 t b b;
#X obj 552 23 r grain-amp;
#X obj 516 232 s grain-amp;
#X connect 0 0 1 0;
#X connect 0 1 1 1;
#X connect 1 0 6 1;
#X connect 2 0 24 0;
#X connect 3 0 2 1;
#X connect 4 0 18 0;
#X connect 5 0 9 0;
#X connect 5 0 4 0;
#X connect 5 0 2 0;
#X connect 6 0 12 0;
#X connect 7 0 11 0;
#X connect 9 0 17 0;
#X connect 10 0 17 0;
#X connect 10 0 18 0;
#X connect 10 0 24 0;
#X connect 11 0 6 0;
#X connect 12 0 5 0;
#X connect 12 1 22 0;
#X connect 13 0 14 0;
#X connect 13 1 14 1;
#X connect 14 0 1 0;
#X connect 15 0 14 0;
#X connect 15 0 20 1;
#X connect 16 0 13 0;
#X connect 16 0 21 1;
#X connect 20 0 9 1;
#X connect 21 0 4 1;
#X connect 22 0 10 0;
#X connect 22 1 20 0;
#X connect 22 1 21 0;
#X connect 22 1 3 0;
#X connect 23 0 3 1;
#X connect 23 0 0 0;
124
#X restore 820 89 pd output;
Miller Puckette's avatar
Miller Puckette committed
125 126 127 128 129 130
#N canvas 516 98 663 559 (subpatch) 0;
#X obj 103 108 outlet;
#X msg 101 80 set \$1;
#X obj 103 57 r loop-amp;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
131
#X restore 545 70 pd;
132
#N canvas 0 262 838 506 fft 0;
Miller Puckette's avatar
Miller Puckette committed
133 134 135 136 137 138 139 140
#X floatatom 305 194 0 0 0 0 - - -;
#X obj 454 160 r sample-rate;
#X obj 454 180 t b f;
#X obj 304 169 r window-size;
#X obj 264 38 r sample-rate;
#X obj 238 16 r window-size;
#X obj 264 58 t b f;
#X obj 238 83 /;
141
#X obj 168 103 bang~;
Miller Puckette's avatar
Miller Puckette committed
142 143 144 145 146 147 148 149 150 151 152
#X obj 169 175 line~;
#X obj 238 104 * 1000;
#X text 298 104 window size (msec);
#X obj 429 140 r location;
#X obj 429 205 *;
#X obj 429 228 * 0.001;
#X text 498 228 location (samples);
#X obj 169 129 f;
#X msg 169 152 0 \, 1 \$1;
#X obj 113 201 *~;
#X obj 113 224 -~;
153 154
#X obj 114 278 *~;
#X obj 114 301 outlet~;
Miller Puckette's avatar
Miller Puckette committed
155 156 157 158 159 160
#X floatatom 429 252 0 0 0 0 - - -;
#X obj 66 31 block~ 2048 1;
#X obj 168 255 tabread4~ sample;
#X obj 169 211 *~ 0;
#X obj 168 232 +~ 0;
#X connect 1 0 2 0;
161 162
#X connect 2 0 13 0;
#X connect 2 1 13 1;
Miller Puckette's avatar
Miller Puckette committed
163
#X connect 3 0 0 0;
164
#X connect 3 0 25 1;
Miller Puckette's avatar
Miller Puckette committed
165 166 167 168 169
#X connect 4 0 6 0;
#X connect 5 0 7 0;
#X connect 6 0 7 0;
#X connect 6 1 7 1;
#X connect 7 0 10 0;
170 171 172 173 174 175
#X connect 8 0 16 0;
#X connect 9 0 18 0;
#X connect 9 0 18 1;
#X connect 9 0 19 1;
#X connect 9 0 25 0;
#X connect 10 0 16 1;
Miller Puckette's avatar
Miller Puckette committed
176
#X connect 12 0 13 0;
177 178 179
#X connect 13 0 14 0;
#X connect 14 0 22 0;
#X connect 14 0 26 1;
Miller Puckette's avatar
Miller Puckette committed
180
#X connect 16 0 17 0;
181 182
#X connect 17 0 9 0;
#X connect 18 0 19 0;
Miller Puckette's avatar
Miller Puckette committed
183
#X connect 19 0 20 0;
184 185 186 187
#X connect 20 0 21 0;
#X connect 24 0 20 1;
#X connect 25 0 26 0;
#X connect 26 0 24 0;
188 189 190 191 192 193 194 195 196 197 198
#X restore 22 460 pd fft;
#X obj 8 483 *~;
#X obj 9 534 hip~ 5;
#X obj 9 561 dac~;
#X obj 612 479 adc~;
#X obj 545 114 s loop-amp;
#X msg 820 68 mute;
#X text 31 110 click here first;
#X text 599 439 live sample;
#X text 677 45 AMPLITUDES;
#N canvas 0 42 1028 664 make-trace 0;
Miller Puckette's avatar
Miller Puckette committed
199 200
#X obj 781 133 pointer;
#X obj 744 602 setsize trace-template bazoo;
201 202 203
#X obj 744 489 random 200;
#X obj 744 511 + 100;
#X obj 857 510 pointer;
Miller Puckette's avatar
Miller Puckette committed
204 205 206 207 208 209 210 211 212 213 214
#X obj 218 532 pointer;
#X floatatom 356 524 0 0 0 0 - - -;
#X floatatom 296 550 0 0 0 0 - - -;
#X msg 205 509 bang;
#X floatatom 108 461 0 0 0 0 - - -;
#X floatatom 40 509 0 0 0 0 - - -;
#X floatatom 153 590 0 0 0 0 - - -;
#X floatatom 516 556 0 0 0 0 - - -;
#X floatatom 356 489 0 0 0 0 - - -;
#X floatatom 667 511 0 0 0 0 - - -;
#X obj 481 464 pointer;
215
#X msg 502 443 next;
Miller Puckette's avatar
Miller Puckette committed
216 217 218 219 220 221 222 223
#X floatatom 532 512 0 0 0 0 - - -;
#X obj 516 539 getsize trace-template bazoo;
#X obj 127 563 get point-template y;
#X obj 40 533 set point-template y;
#X obj 101 486 element trace-template bazoo;
#X obj 296 580 setsize trace-template bazoo;
#X obj 356 507 set trace-template x;
#X obj 356 542 set trace-template y;
224 225
#X msg 744 467 bang;
#X obj 744 533 append trace-template x;
Miller Puckette's avatar
Miller Puckette committed
226
#X obj 519 489 get trace-template x y;
227 228 229 230
#X obj 744 556 t b p;
#X msg 744 579 5;
#X obj 781 155 s last-in-list;
#X msg 780 37 bang;
Miller Puckette's avatar
Miller Puckette committed
231
#X obj 780 60 t b b;
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
#X obj 710 134 f 0;
#X obj 710 156 s nframe;
#X obj 475 110 r nframe;
#X obj 458 133 f;
#X obj 458 157 + 1;
#X obj 458 179 s nframe;
#X obj 780 15 r clear-all;
#X msg 781 111 traverse pd-trace-list \, bang;
#X msg 482 422 traverse pd-trace-list \, next;
#X msg 857 488 traverse pd-trace-list \, bang;
#X obj 652 213 add-trace 0;
#X obj 458 77 r done-analysis;
#X msg 833 56 \; pd-trace-list clear \; add-trace-clear bang;
#X obj 652 234 add-trace 1;
#X obj 652 254 add-trace 2;
#X obj 652 274 add-trace 3;
#X obj 652 294 add-trace 4;
#X obj 652 314 add-trace 5;
#X obj 652 334 add-trace 6;
#X obj 652 354 add-trace 7;
#X obj 652 374 add-trace 8;
#X obj 652 394 add-trace 9;
#X obj 744 214 add-trace 10;
#X obj 744 235 add-trace 11;
#X obj 744 255 add-trace 12;
#X obj 744 275 add-trace 13;
#X obj 744 295 add-trace 14;
#X obj 744 315 add-trace 15;
#X obj 744 335 add-trace 16;
#X obj 744 355 add-trace 17;
#X obj 744 375 add-trace 18;
#X obj 744 395 add-trace 19;
#X obj 836 215 add-trace 20;
#X obj 837 234 add-trace 21;
#X obj 837 254 add-trace 22;
#X obj 837 274 add-trace 23;
#X obj 837 294 add-trace 24;
#X obj 837 314 add-trace 25;
#X obj 837 334 add-trace 26;
#X obj 837 354 add-trace 27;
#X obj 837 374 add-trace 28;
#X obj 837 394 add-trace 29;
#X obj 929 214 add-trace 30;
#X obj 929 234 add-trace 31;
#X obj 929 254 add-trace 32;
#X obj 929 274 add-trace 33;
#X obj 929 294 add-trace 34;
#X obj 929 314 add-trace 35;
#X obj 929 334 add-trace 36;
#X obj 929 355 add-trace 37;
#X obj 929 374 add-trace 38;
#X obj 929 394 add-trace 39;
#X obj 1021 214 add-trace 40;
#X obj 1021 234 add-trace 41;
#X obj 1021 254 add-trace 42;
#X obj 1021 275 add-trace 43;
#X obj 1021 294 add-trace 44;
#X obj 1021 314 add-trace 45;
#X obj 1021 334 add-trace 46;
#X obj 1021 355 add-trace 47;
#X obj 1021 374 add-trace 48;
#X obj 1021 394 add-trace 49;
#X connect 0 0 30 0;
#X connect 2 0 3 0;
#X connect 3 0 26 0;
#X connect 4 0 26 1;
#X connect 5 0 19 0;
#X connect 6 0 24 0;
#X connect 7 0 22 0;
#X connect 8 0 5 0;
#X connect 9 0 21 0;
#X connect 10 0 20 0;
#X connect 13 0 23 0;
#X connect 15 0 22 1;
#X connect 15 0 23 1;
#X connect 15 0 24 1;
#X connect 15 0 21 1;
#X connect 15 0 27 0;
#X connect 15 0 18 0;
#X connect 16 0 15 0;
#X connect 18 0 12 0;
#X connect 19 0 11 0;
#X connect 21 0 5 0;
#X connect 21 0 20 1;
#X connect 25 0 2 0;
#X connect 26 0 28 0;
#X connect 27 0 17 0;
#X connect 27 1 14 0;
#X connect 28 0 29 0;
#X connect 28 1 1 1;
#X connect 29 0 1 0;
#X connect 31 0 32 0;
#X connect 32 0 40 0;
#X connect 32 0 33 0;
#X connect 32 1 45 0;
#X connect 33 0 34 0;
#X connect 35 0 36 1;
#X connect 36 0 37 0;
#X connect 37 0 38 0;
#X connect 39 0 31 0;
#X connect 40 0 0 0;
#X connect 41 0 15 0;
#X connect 42 0 4 0;
#X connect 44 0 36 0;
Miller Puckette's avatar
Miller Puckette committed
336
#X restore 417 503 pd make-trace;
337 338 339 340 341 342 343 344 345 346 347 348 349 350
#X floatatom 74 256 0 0 0 0 location location-set location;
#X obj 106 407 r loop-amp;
#X obj 737 308 f;
#X obj 777 308 +;
#X msg 695 350 0;
#X msg 694 267 1;
#X msg 737 357 \; location \$1 \; snapshot bang;
#X msg 655 190 bang \; location 0 \; clear-all bang;
#X floatatom 655 325 0 0 0 0 - - -;
#X obj 655 245 t b b;
#X obj 838 290 r incr;
#X obj 8 373 r grain-amp;
#X obj 121 457 r osc-amp;
#X obj 143 543 catch~ osc-sum;
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517
#N canvas 0 0 887 632 osc-bank 0;
#X msg 203 132 0;
#X obj 508 403 pointer;
#X obj 415 229 pointer;
#X msg 341 373 next;
#X msg 332 169 1;
#X msg 373 168 0;
#X obj 415 326 <;
#X obj 415 252 t p p;
#X obj 203 213 until;
#X obj 413 55 r start-resynth;
#X obj 314 229 f;
#X obj 314 252 sel 0 1;
#X obj 446 326 r synth-index;
#X obj 414 349 sel 0 1;
#X obj 72 91 r step-resynth;
#X obj 203 159 f;
#X obj 204 183 s synth-index;
#X obj 244 160 + 5;
#X obj 72 113 t b b b;
#X obj 73 187 s osc-tick;
#X msg 413 166 traverse pd-trace-list \, next;
#N canvas 0 55 1009 518 oscs 0;
#X obj 18 66 route 1 2 3 4 5 6 7 8 9 10;
#X obj 272 65 route 11 12 13 14 15 16 17 18 19 20;
#X obj 17 26 inlet;
#X obj 594 66 route 21 22 23 24 25 26 27 28 29 30;
#X obj 154 293 route 31 32 33 34 35 36 37 38 39 40;
#X obj 465 294 route 41 42 43 44 45 46 47 48 49 50;
#X obj 18 260 osc-voice;
#X obj 60 222 osc-voice;
#X obj 206 89 osc-voice;
#X obj 185 107 osc-voice;
#X obj 164 127 osc-voice;
#X obj 143 146 osc-voice;
#X obj 122 166 osc-voice;
#X obj 102 184 osc-voice;
#X obj 81 203 osc-voice;
#X obj 39 242 osc-voice;
#X obj 506 91 osc-voice;
#X obj 485 109 osc-voice;
#X obj 464 129 osc-voice;
#X obj 443 148 osc-voice;
#X obj 422 168 osc-voice;
#X obj 402 186 osc-voice;
#X obj 381 205 osc-voice;
#X obj 360 224 osc-voice;
#X obj 339 244 osc-voice;
#X obj 318 262 osc-voice;
#X obj 828 92 osc-voice;
#X obj 807 110 osc-voice;
#X obj 786 130 osc-voice;
#X obj 765 149 osc-voice;
#X obj 744 169 osc-voice;
#X obj 724 187 osc-voice;
#X obj 703 206 osc-voice;
#X obj 682 225 osc-voice;
#X obj 661 245 osc-voice;
#X obj 640 263 osc-voice;
#X obj 388 319 osc-voice;
#X obj 367 337 osc-voice;
#X obj 346 357 osc-voice;
#X obj 325 376 osc-voice;
#X obj 304 396 osc-voice;
#X obj 284 414 osc-voice;
#X obj 263 433 osc-voice;
#X obj 242 452 osc-voice;
#X obj 221 472 osc-voice;
#X obj 200 490 osc-voice;
#X obj 699 320 osc-voice;
#X obj 678 338 osc-voice;
#X obj 657 358 osc-voice;
#X obj 636 377 osc-voice;
#X obj 615 397 osc-voice;
#X obj 595 415 osc-voice;
#X obj 574 434 osc-voice;
#X obj 553 453 osc-voice;
#X obj 532 473 osc-voice;
#X obj 511 491 osc-voice;
#X connect 0 0 6 0;
#X connect 0 1 15 0;
#X connect 0 2 7 0;
#X connect 0 3 14 0;
#X connect 0 4 13 0;
#X connect 0 5 12 0;
#X connect 0 6 11 0;
#X connect 0 7 10 0;
#X connect 0 8 9 0;
#X connect 0 9 8 0;
#X connect 0 10 1 0;
#X connect 1 0 25 0;
#X connect 1 1 24 0;
#X connect 1 2 23 0;
#X connect 1 3 22 0;
#X connect 1 4 21 0;
#X connect 1 5 20 0;
#X connect 1 6 19 0;
#X connect 1 7 18 0;
#X connect 1 8 17 0;
#X connect 1 9 16 0;
#X connect 1 10 3 0;
#X connect 2 0 0 0;
#X connect 3 0 35 0;
#X connect 3 1 34 0;
#X connect 3 2 33 0;
#X connect 3 3 32 0;
#X connect 3 4 31 0;
#X connect 3 5 30 0;
#X connect 3 6 29 0;
#X connect 3 7 28 0;
#X connect 3 8 27 0;
#X connect 3 9 26 0;
#X connect 3 10 4 0;
#X connect 4 0 45 0;
#X connect 4 1 44 0;
#X connect 4 2 43 0;
#X connect 4 3 42 0;
#X connect 4 4 41 0;
#X connect 4 5 40 0;
#X connect 4 6 39 0;
#X connect 4 7 38 0;
#X connect 4 8 37 0;
#X connect 4 9 36 0;
#X connect 4 10 5 0;
#X connect 5 0 55 0;
#X connect 5 1 54 0;
#X connect 5 2 53 0;
#X connect 5 3 52 0;
#X connect 5 4 51 0;
#X connect 5 5 50 0;
#X connect 5 6 49 0;
#X connect 5 7 48 0;
#X connect 5 8 47 0;
#X connect 5 9 46 0;
#X restore 380 563 pd oscs;
#X obj 412 92 t b b b;
#X msg 475 92 \; pd-trace-list sort;
#X obj 332 199 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 415 276 get trace-template x;
#X obj 415 302 f;
#X obj 437 376 t b b b;
#X obj 380 504 poly 50;
#X obj 379 437 f;
#X obj 420 426 + 1;
#X obj 420 450 mod 1e+06;
#X obj 379 476 pack 0 1;
#X obj 380 534 pack f f f p;
#X text 297 425 make an ID;
#X text 298 439 for the;
#X text 300 454 track;
#X obj 161 455 r osc-noteoff;
#X text 159 409 voice sends us;
#X text 158 424 a note-off when;
#X text 161 436 done;
#X text 457 555 message is: voice number \, on/off \, track ID \, pointer
;
#X obj 160 482 pack 0 0;
#X connect 0 0 15 0;
#X connect 1 0 33 3;
#X connect 2 0 7 0;
#X connect 2 1 5 0;
#X connect 2 1 8 1;
#X connect 3 0 2 0;
#X connect 4 0 24 0;
#X connect 5 0 24 0;
#X connect 6 0 13 0;
Miller Puckette's avatar
Miller Puckette committed
518
#X connect 7 0 25 0;
519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557
#X connect 7 1 1 1;
#X connect 8 0 10 0;
#X connect 9 0 22 0;
#X connect 10 0 11 0;
#X connect 11 0 8 1;
#X connect 11 1 26 0;
#X connect 12 0 6 1;
#X connect 13 0 8 1;
#X connect 13 1 27 0;
#X connect 14 0 18 0;
#X connect 15 0 16 0;
#X connect 15 0 17 0;
#X connect 17 0 15 1;
#X connect 18 0 19 0;
#X connect 18 1 8 0;
#X connect 18 2 15 0;
#X connect 20 0 2 0;
#X connect 22 0 20 0;
#X connect 22 1 4 0;
#X connect 22 1 0 0;
#X connect 22 2 23 0;
#X connect 24 0 10 1;
#X connect 25 0 26 0;
#X connect 26 0 6 0;
#X connect 27 0 3 0;
#X connect 27 1 29 0;
#X connect 27 2 1 0;
#X connect 28 0 33 0;
#X connect 28 1 33 2;
#X connect 28 2 33 1;
#X connect 29 0 30 0;
#X connect 29 0 32 0;
#X connect 30 0 31 0;
#X connect 31 0 29 1;
#X connect 32 0 28 0;
#X connect 33 0 21 0;
#X connect 37 0 42 0;
#X connect 42 0 28 0;
#X restore 417 458 pd osc-bank;
558
#X obj 647 118 s grain-amp;
559
#N canvas 207 28 820 345 save-list 0;
Miller Puckette's avatar
Miller Puckette committed
560 561 562 563
#X floatatom 759 255 0 0 0 0 - - -;
#X floatatom 677 254 0 0 0 0 - - -;
#X floatatom 599 251 0 0 0 0 - - -;
#X floatatom 517 250 0 0 0 0 - - -;
564
#X obj 448 201 pointer;
Miller Puckette's avatar
Miller Puckette committed
565 566
#X obj 307 121 pointer;
#X msg 328 47 bang;
567
#X obj 134 193 rmstodb;
Miller Puckette's avatar
Miller Puckette committed
568
#X obj 10 201 * 0.1;
569
#X obj 134 216 * -3;
Miller Puckette's avatar
Miller Puckette committed
570
#X floatatom 445 247 0 0 0 0 - - -;
571
#X obj 304 24 r start-analysis;
Miller Puckette's avatar
Miller Puckette committed
572
#X obj 305 71 t b b;
573 574
#X msg 469 180 next;
#X obj 443 222 get peak-template x y amp ampreal ampimag;
Miller Puckette's avatar
Miller Puckette committed
575
#X obj 9 241 append peak-template x y amp ampreal ampimag;
576
#X obj 126 137 r found-peak;
Miller Puckette's avatar
Miller Puckette committed
577 578
#X obj 126 161 unpack 0 0 0 0 0;
#X msg 81 201 330;
579
#X msg 374 58 \; pd-peak-list clear;
Miller Puckette's avatar
Miller Puckette committed
580
#X msg 305 100 traverse pd-peak-list \, bang;
581
#X msg 450 161 traverse pd-peak-list \, next;
Miller Puckette's avatar
Miller Puckette committed
582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606
#X connect 4 0 14 0;
#X connect 5 0 15 5;
#X connect 6 0 12 0;
#X connect 7 0 9 0;
#X connect 8 0 15 0;
#X connect 9 0 15 2;
#X connect 11 0 12 0;
#X connect 12 0 20 0;
#X connect 12 1 19 0;
#X connect 13 0 4 0;
#X connect 14 0 10 0;
#X connect 14 1 3 0;
#X connect 14 2 2 0;
#X connect 14 3 1 0;
#X connect 14 4 0 0;
#X connect 16 0 17 0;
#X connect 17 1 8 0;
#X connect 17 2 18 0;
#X connect 17 2 7 0;
#X connect 17 3 15 3;
#X connect 17 4 15 4;
#X connect 18 0 15 1;
#X connect 20 0 5 0;
#X connect 21 0 4 0;
#X restore 417 481 pd save-list;
607 608 609 610 611 612 613 614
#X msg 139 369 \; start-resynth bang;
#X msg 301 370 \; step-resynth bang;
#X msg 461 372 \; osc-stop bang;
#X text 780 136 resynth;
#X text 643 135 analyzed grains;
#X text 545 133 original;
#X text 622 166 ... and here third to analyze;
#X text 250 110 read a sample;
Miller Puckette's avatar
Miller Puckette committed
615
#N canvas 190 43 500 453 test-signal 0;
Miller Puckette's avatar
Miller Puckette committed
616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660
#X obj 174 293 tabread4~ sample;
#X obj 174 268 line~;
#X obj 123 146 f;
#X obj 330 46 r insamprate;
#X obj 177 350 *~;
#X obj 213 351 dbtorms;
#X obj 213 328 inlet;
#X obj 175 415 outlet~;
#X obj 190 33 r insamplength;
#X msg 174 247 0 \, \$1 \$2;
#X obj 174 221 pack 0 0;
#X obj 272 190 /;
#X obj 389 99 * 0.001;
#X obj 175 388 hip~ 5;
#X obj 43 5 loadbang;
#X text 315 13 sample playback;
#X msg 43 25 1;
#X obj 43 69 metro 1000;
#X floatatom 43 48 0 0 0 0 - - -;
#X obj 331 75 t b b f;
#X obj 209 84 t b f;
#X connect 0 0 4 0;
#X connect 1 0 0 0;
#X connect 2 0 10 0;
#X connect 3 0 19 0;
#X connect 4 0 13 0;
#X connect 5 0 4 1;
#X connect 6 0 5 0;
#X connect 8 0 20 0;
#X connect 9 0 1 0;
#X connect 10 0 9 0;
#X connect 11 0 10 1;
#X connect 11 0 17 1;
#X connect 12 0 11 1;
#X connect 13 0 7 0;
#X connect 14 0 16 0;
#X connect 16 0 18 0;
#X connect 17 0 2 0;
#X connect 18 0 17 0;
#X connect 19 0 16 0;
#X connect 19 1 11 0;
#X connect 19 2 12 0;
#X connect 20 0 16 0;
#X connect 20 1 11 0;
#X connect 20 1 2 1;
661
#X restore 106 430 pd test-signal;
Miller Puckette's avatar
Miller Puckette committed
662 663
#N canvas 132 255 634 331 insample 0;
#N canvas 0 0 450 300 (subpatch) 0;
664
#X array sample 62079 float 0 black black;
Miller Puckette's avatar
Miller Puckette committed
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
#X coords 0 1 62078 -1 400 150 1;
#X restore 259 18 graph;
#X obj 25 70 r read-sample;
#X obj 25 95 unpack s f;
#X obj 69 121 s insamprate;
#X obj 25 171 soundfiler;
#X msg 25 147 read -resize \$1 sample;
#X obj 25 201 s insamplength;
#X msg 464 197 \; sample resize 220500 \; insamplength 220500;
#X obj 42 272 declare -path lib;
#X connect 1 0 2 0;
#X connect 2 0 5 0;
#X connect 2 1 3 0;
#X connect 4 0 6 0;
#X connect 5 0 4 0;
680 681 682
#X restore 308 509 pd insample;
#X obj 604 503 tabwrite~ sample;
#X obj 752 288 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
Miller Puckette's avatar
Miller Puckette committed
683
-1;
684
#X obj 301 326 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
Miller Puckette's avatar
Miller Puckette committed
685
1;
686
#X msg 187 127 \; read-sample ../doc/sound/bell.aiff 44100;
687
#N canvas 12 201 728 480 sigmund 0;
Miller Puckette's avatar
Miller Puckette committed
688 689 690 691 692 693
#X obj 2 227 spigot;
#X obj 165 94 f;
#X obj 165 128 pack;
#X obj 268 67 r window-size;
#X obj 354 92 r location;
#X obj 354 116 *;
694 695
#X obj 449 47 r sample-rate;
#X obj 449 71 * 0.001;
Miller Puckette's avatar
Miller Puckette committed
696 697 698 699
#X obj 166 31 r snapshot;
#X obj 73 228 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 24 331 s done-analysis;
700 701
#X obj 355 334 s start-analysis;
#X obj 147 333 s found-peak;
Miller Puckette's avatar
Miller Puckette committed
702
#X obj 26 303 spigot;
703 704
#X obj 145 306 spigot;
#X obj 356 305 spigot;
Miller Puckette's avatar
Miller Puckette committed
705 706 707 708 709 710 711
#X obj 390 278 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 165 64 t b b b;
#X msg 165 160 list sample \$1 \$2 44100 0;
#X obj 53 163 print;
#X obj 391 230 loadbang;
#X msg 392 251 1;
712 713 714 715 716 717 718 719 720
#X obj 257 306 spigot;
#X obj 259 333 s track-out;
#X obj 556 288 spigot;
#X obj 627 289 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 555 314 print t;
#X obj 1 253 print p;
#X obj 165 186 sigmund~ -t -npts 1024 -npeak 40 -maxfreq 8000 peaks
tracks;
721
#X floatatom 507 135 5 1 50 0 - - -, f 5;
722 723 724
#X msg 507 155 npeak \$1;
#X obj 506 109 r nvoice;
#X connect 0 0 27 0;
Miller Puckette's avatar
Miller Puckette committed
725
#X connect 1 0 2 0;
726 727 728 729 730
#X connect 2 0 18 0;
#X connect 2 0 19 0;
#X connect 3 0 1 1;
#X connect 4 0 5 0;
#X connect 5 0 2 1;
Miller Puckette's avatar
Miller Puckette committed
731
#X connect 6 0 7 0;
732 733 734 735 736 737 738 739 740 741
#X connect 7 0 5 1;
#X connect 8 0 17 0;
#X connect 9 0 0 1;
#X connect 13 0 10 0;
#X connect 14 0 12 0;
#X connect 15 0 11 0;
#X connect 16 0 15 1;
#X connect 16 0 14 1;
#X connect 16 0 13 1;
#X connect 16 0 22 1;
Miller Puckette's avatar
Miller Puckette committed
742
#X connect 17 0 13 0;
743 744 745 746 747
#X connect 17 1 1 0;
#X connect 17 2 15 0;
#X connect 18 0 28 0;
#X connect 20 0 21 0;
#X connect 21 0 16 0;
Miller Puckette's avatar
Miller Puckette committed
748
#X connect 22 0 23 0;
749 750 751 752 753 754 755 756 757 758
#X connect 24 0 26 0;
#X connect 25 0 24 1;
#X connect 28 0 0 0;
#X connect 28 0 14 0;
#X connect 28 1 22 0;
#X connect 28 1 24 0;
#X connect 29 0 30 0;
#X connect 30 0 28 0;
#X connect 31 0 29 0;
#X restore 417 436 pd sigmund;
759 760 761 762
#X msg 187 162 \; read-sample ../doc/sound/voice.wav 44100;
#X msg 187 197 \; read-sample ../doc/sound/voice2.wav 44100;
#X obj 737 331 moses 1350;
#X text 142 266 to resynthesize \, "start" once and "step" ad lib.
Miller Puckette's avatar
Miller Puckette committed
763 764
To stop \, stop stepping and hit osc-stop. Note resynth amplitude control
above.;
765
#X msg 22 127 \; pd dsp 1 \; window-size 2048 \; sample-rate 44100
766
\; incr 10;
767 768
#X obj 737 265 metro 50;
#X obj 301 346 metro 10;
769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824
#N canvas 0 0 1028 393 misc 0;
#X floatatom 56 120 0 0 0 0 - - -;
#X obj 56 141 s loud;
#X msg 49 84 \; clear-all bang;
#X msg 51 52 \; snapshot bang;
#X obj 233 60 osc~ 110;
#X obj 287 115 line~;
#X obj 233 112 *~;
#X obj 231 150 +~ 0.2;
#X obj 230 178 cos~;
#X obj 269 212 line~;
#X obj 227 211 *~;
#X obj 234 295 tabwrite~ sample;
#X obj 426 31 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 345 75 0 \, 2 500;
#X msg 438 75 0 \, 1 100;
#X obj 538 121 del 500;
#X msg 426 164 0.05 500;
#X msg 532 171 0 2000;
#X obj 723 119 r location;
#X msg 723 140 set \$1;
#X obj 722 163 s location-set;
#X msg 719 224 set \$1;
#X obj 719 203 r osc-speed;
#X obj 719 247 s osc-speed-set;
#X msg 718 318 set \$1;
#X obj 718 297 r nvoice;
#X obj 718 341 s nvoice-set;
#X obj 725 33 loadbang;
#X msg 725 60 \; osc-speed 10 \; nvoice 25;
#X connect 0 0 1 0;
#X connect 4 0 6 0;
#X connect 5 0 6 1;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 10 0;
#X connect 9 0 10 1;
#X connect 10 0 11 0;
#X connect 12 0 13 0;
#X connect 12 0 11 0;
#X connect 12 0 14 0;
#X connect 12 0 15 0;
#X connect 13 0 5 0;
#X connect 14 0 9 0;
#X connect 15 0 17 0;
#X connect 15 0 16 0;
#X connect 16 0 5 0;
#X connect 17 0 9 0;
#X connect 18 0 19 0;
#X connect 19 0 20 0;
#X connect 21 0 23 0;
#X connect 22 0 21 0;
#X connect 24 0 26 0;
#X connect 25 0 24 0;
#X connect 27 0 28 0;
825 826 827 828 829 830 831
#X restore 308 488 pd misc;
#X floatatom 412 316 0 0 0 0 osc-speed osc-speed-set osc-speed;
#X floatatom 75 281 0 1 50 0 nvoice nvoice-set nvoice;
#X obj 366 346 r osc-speed;
#X text 24 313 analysis;
#X text 26 328 parameters;
#X text 19 37 This patch derives sinusoidal "tracks" from a sampled
832 833
sound using sigmund~ and the data structure facilities. The number
of tracks may range from 1 to 50 You can edit the tracks (but note
834
that the resynthesizer is limited to 50-voice polyphony.);
835 836 837 838 839 840
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header sinusoid_tracking
20 10 1 18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X obj 1 605 cnv 15 445 20 empty \$0-pddp.cnv.footer empty 20 12 0
14 -233017 -33289 0;
841 842 843 844 845 846
#N canvas 45 271 494 284 META 0;
#X text 12 105 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 85 AUTHOR Miller Puckette;
#X text 12 65 LIBRARY PDDP;
#X text 12 25 LICENSE SIBSD;
#X text 12 125 HELP_PATCH_AUTHORS Jonathan Wilkes revised the patch
847
to conform to the PDDP template for Pd version 0.42.;
848 849
#X text 12 45 DESCRIPTION sinusoid tracking;
#X text 12 5 KEYWORDS data_structure GUI tutorial;
850 851 852 853 854 855 856 857
#X restore 392 607 pd META;
#N canvas 13 202 428 190 References 0;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 sinusoid tracking- Related Help Documents;
#X text 19 37 Links:;
#X restore 103 607 pd References;
#X obj 6 607 pddp/pddplink ../5.reference/pddp/help.pd -text help;
Miller Puckette's avatar
Miller Puckette committed
858 859 860 861 862 863
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 3 0 4 0;
#X connect 4 0 6 0;
#X connect 5 0 3 0;
#X connect 6 0 27 0;
864
#X connect 7 0 73 1;
865
#X connect 8 0 38 1;
866
#X connect 9 0 73 0;
867 868
#X connect 10 0 39 1;
#X connect 11 0 51 0;
Miller Puckette's avatar
Miller Puckette committed
869
#X connect 12 0 11 0;
870
#X connect 18 0 63 0;
Miller Puckette's avatar
Miller Puckette committed
871 872 873 874 875 876 877 878 879
#X connect 19 0 20 0;
#X connect 20 0 26 0;
#X connect 21 0 19 0;
#X connect 22 0 30 0;
#X connect 24 0 22 0;
#X connect 25 0 26 1;
#X connect 26 0 27 0;
#X connect 27 0 28 0;
#X connect 27 0 28 1;
880
#X connect 29 0 63 0;
Miller Puckette's avatar
Miller Puckette committed
881
#X connect 31 0 23 0;
882 883 884
#X connect 37 0 61 0;
#X connect 38 0 39 0;
#X connect 38 0 44 0;
885
#X connect 38 0 70 0;
886 887 888 889 890 891 892 893 894 895 896
#X connect 39 0 38 1;
#X connect 40 0 9 0;
#X connect 41 0 9 0;
#X connect 43 0 45 0;
#X connect 45 0 41 0;
#X connect 45 1 8 0;
#X connect 46 0 10 0;
#X connect 47 0 21 0;
#X connect 48 0 5 0;
#X connect 49 0 6 1;
#X connect 61 0 27 0;
897 898 899 900 901 902 903
#X connect 64 0 38 0;
#X connect 65 0 74 0;
#X connect 70 0 42 0;
#X connect 70 1 40 0;
#X connect 73 0 38 0;
#X connect 74 0 54 0;
#X connect 78 0 74 1;