aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/4.fft.examples/13.partialtracer.pd
blob: 7d806b649380565ccb5b56beafbd7eef07abb26d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
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
518
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
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
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
607
608
609
610
611
612
613
614
615
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
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
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
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
#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 234 52 951 590 12;
#X floatatom 777 72 0 0 0 0 - - -;
#N canvas 516 98 663 557 boo 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;
#X restore 777 52 pd;
#X obj 781 99 s osc-amp;
#X obj 121 513 pack 0 100;
#X obj 122 533 line~;
#X obj 121 493 dbtorms;
#X obj 122 573 *~;
#X floatatom 811 225 0 0 0 0 - - -;
#X msg 668 269 0;
#X floatatom 737 225 0 0 0 0 - - -;
#X floatatom 838 290 0 0 0 0 - - -;
#X floatatom 647 71 0 0 0 0 - - -;
#N canvas 516 98 663 555 boo 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;
#X restore 647 51 pd;
#N canvas 201 90 556 354 analysis 0;
#X obj 286 45 r snapshot;
#X obj 81 283 print;
#X obj 138 154 t b b b;
#X obj 26 189 s done-analysis;
#X obj 272 149 s start-analysis;
#X obj 209 261 s found-peak;
#X obj 139 263 r loud;
#X obj 82 262 spigot;
#X msg 179 101 1;
#X obj 40 99 r fft-done;
#X obj 40 129 spigot;
#X msg 143 101 0;
#X obj 289 84 del 0.01;
#X msg 287 66 bang;
#X text 238 103 Wait for the next FFT to come by before doing the peak
search.;
#X obj 443 176 r errthresh;
#X msg 446 219 errthresh \$1;
#X floatatom 443 199 0 0 0 0 - - -;
#X obj 276 173 r window-size;
#X obj 220 190 f;
#X msg 211 211 \$1 fft-real fft-imag 10;
#X obj 211 231 pique;
#X connect 0 0 13 0;
#X connect 2 0 3 0;
#X connect 2 1 19 0;
#X connect 2 2 4 0;
#X connect 2 2 11 0;
#X connect 6 0 7 1;
#X connect 7 0 1 0;
#X connect 8 0 10 1;
#X connect 9 0 10 0;
#X connect 10 0 2 0;
#X connect 11 0 10 1;
#X connect 12 0 8 0;
#X connect 13 0 12 0;
#X connect 15 0 17 0;
#X connect 16 0 21 0;
#X connect 17 0 16 0;
#X connect 18 0 19 1;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 21 0 5 0;
#X connect 21 0 7 0;
#X restore 351 411 pd analysis;
#N canvas 168 244 411 214 peak-template 0;
#X obj 81 52 filledpolygon 3 3 3 0 0 0 amp 0 0;
#X obj 74 10 template float x float y float amp float ampreal float
ampimag float used;
#X restore 351 516 pd peak-template;
#N canvas 0 0 600 386 peak-list 0;
#X scalar peak-template 13.1452 330 -266.143 -0.00356225 0.272701 1
\;;
#X scalar peak-template 26.2411 330 -188.677 -0.0124586 0.00627935
1 \;;
#X scalar peak-template 38.792 330 -192.702 0.0107086 -0.0122645 0
\;;
#X scalar peak-template 50.5319 330 -171.943 0.00265002 0.00684531
1 \;;
#X scalar peak-template 58.3058 330 -161.228 -0.000605629 0.00482765
1 \;;
#X scalar peak-template 71.0373 330 -243.962 0.0471989 0.106425 1 \;
;
#X scalar peak-template 88.9919 330 -164.582 0.00547503 0.000805021
0 \;;
#X scalar peak-template 107.947 330 -209.931 -0.0168408 0.0266666 1
\;;
#X scalar peak-template 119.917 330 -160.305 0.00362793 -0.0029822
1 \;;
#X scalar peak-template 129.045 330 -153.946 0.0019865 0.00309702 1
\;;
#X restore 351 454 pd peak-list;
#N canvas 20 23 472 426 trace-list 1;
#X scalar trace-template 5 -17 10 \; -199.613 82.4286 \; -193.527 82.3195
\; -188.888 79.2392 \; -190.335 80.935 \; -193.692 85.069 \; -193.568
85.3128 \; -189.446 82.4412 \; -189.463 82.6427 \; -193.472 85.715
\; -193.644 85.7878 \; -190.286 82.9838 \; -190.22 83.2074 \; -193.608
86.4234 \; -193.752 86.8166 \; -190.752 84.226 \; -189.701 83.7983
\; -193.462 86.6934 \; -193.946 87.5821 \; -191.452 85.4317 \; -188.947
84.731 \; -192.67 87.311 \; -193.589 88.3214 \; -191.457 86.3421 \;
-189.539 85.4724 \; -192.837 87.7069 \; -193.597 88.6789 \; -191.638
86.7933 \; -189.202 85.5926 \; -192.314 87.3853 \; -193.414 88.3447
\; -191.768 86.6039 \; -189.511 85.4104 \; -192.226 87.0602 \; -193.354
88.0144 \; -200.124 86.4402 \; -213.124 85.0898 \; -230.124 86.4172
\; -241.124 87.5061 \; -257.124 86.4658 \; -271.124 85.3372 \; -277.124
86.3322 \; -294.124 87.3605 \; -300.124 86.5994 \; -306.124 85.6122
\; -315.124 86.2608 \; -230.124 86.9223 \; -216.124 86.1642 \; -202.124
85.7039 \; -188.124 86.9326 \; -178.124 87.7093 \; -170.124 86.9776
\; -162.124 86.3876 \; -150.124 87.2425 \; -146.124 87.8862 \; -141.124
87.2632 \; -142.124 86.7912 \; -144.124 87.6082 \; -150.124 88.2056
\; -156.124 87.6071 \; -164.124 87.0852 \; -172.124 87.6486 \; -276.124
88.1112 \; -236.124 87.6803 \; -191.429 87.3594 \; -191.999 87.8509
\; -192.288 88.1035 \; -191.762 87.6553 \; -191.442 87.48 \; -191.991
87.8655 \; -192.282 87.9377 \; -191.819 87.4774 \; -191.528 87.3144
\; -192.095 87.7807 \; -192.312 87.9379 \; -191.627 87.3867 \; -191.304
87.1667 \; -192.098 87.7212 \; -192.4 87.9508 \; -191.793 87.4684 \;
-191.394 87.3245 \; -191.972 87.9335 \; -192.214 88.197 \; -191.675
87.769 \; -191.461 87.7549 \; -192.195 88.46 \; -192.467 88.6739 \;
-191.769 88.1294 \; -191.444 87.9849 \; -192.159 88.5705 \; -192.338
88.7136 \; \;;
#X scalar trace-template 0 0 9 \; -242.604 72.4257 \; -239.483 72.5931
\; -237.938 74.2024 \; -237.967 75.1307 \; -238.432 75.6971 \; -239.134
76.8606 \; -239.368 77.6083 \; -239.526 77.5637 \; -239.815 77.4497
\; -239.784 77.4643 \; -239.294 77.7178 \; -239.373 78.1029 \; -239.89
78.2493 \; -240.14 78.3881 \; -240.024 78.508 \; -239.931 78.4701 \;
-239.901 78.2419 \; -240.135 78.046 \; -240.12 77.78 \; -239.985 77.2291
\; -240.026 76.61 \; -240.314 76.3586 \; -245.427 76.4585 \; -245.427
76.929 \; -247.427 77.7947 \; -247.427 78.7843 \; -247.427 79.2856
\; -244.427 79.0044 \; -242.427 78.3629 \; -237.427 77.7585 \; -241.427
77.4592 \; -236.427 77.7988 \; -236.427 78.2412 \; -242.427 77.9007
\; -241.427 77.1143 \; -243.427 76.5427 \; -239.765 76.038 \; -239.745
75.6009 \; -239.682 75.518 \; -239.741 75.4267 \; -239.708 75.1939
\; -239.603 74.8523 \; -239.549 74.3391 \; -239.669 73.7522 \; -240.199
73.2379 \; -240.163 72.0729 \; -238.873 69.5928 \; -237.836 67.9847
\; -238.994 68.8343 \; -238.65 69.2716 \; -238.479 68.1999 \; -239.098
66.65 \; -239.075 64.5108 \; -239.716 59.5511 \; -243.426 59.3727 \;
-239.55 61.3263 \; -237.997 64.5714 \; -238.441 65.5136 \; -239.946
65.642 \; -239.519 64.5486 \; -238.355 62.6434 \; -238.261 58.2019
\; -231.029 54.6574 \; -231.388 53.416 \; -237.379 54.176 \; -235.315
55.687 \; \;;
#X scalar trace-template 0 0 8 \; -267.035 74.7826 \; -267.036 74.0101
\; -268.754 71.1861 \; -267.988 70.9211 \; -267.686 72.0078 \; -267.473
72.4722 \; -263.142 73.1691 \; -260.694 72.459 \; -260.215 70.7694
\; -260.032 70.3037 \; -260.078 69.6541 \; -259.805 69.8861 \; -259.903
70.912 \; -262.604 70.5604 \; -260.805 68.8099 \; -260.154 65.6486
\; \;;
#X scalar trace-template 0 0 7 \; -297.412 68.2501 \; -298.035 66.8597
\; -298.676 63.7056 \; -298.326 60.8013 \; \;;
#X scalar trace-template 0 32 6 \; -308.895 73.4936 \; -308.721 73.7641
\; -308.751 74.0691 \; -308.983 74.6651 \; -308.906 74.8441 \; -308.799
75.0179 \; -308.882 75.4667 \; -308.933 75.714 \; -309.1 76.062 \;
-309.109 76.1234 \; -308.966 75.6084 \; -308.983 75.4375 \; -309.053
75.8479 \; -309.072 76.319 \; -309.046 76.7579 \; -308.996 77.0079
\; -309.043 77.0111 \; -309.094 76.8073 \; -309.091 76.2513 \; -309.091
75.331 \; -309.087 74.1997 \; -309.236 73.3714 \; -309.35 73.0891 \;
-309.27 72.9043 \; -309.262 73.3638 \; -309.298 74.6891 \; -309.186
75.9138 \; -309.033 76.8267 \; -308.947 77.3623 \; -308.9 77.4239 \;
-308.872 77.2091 \; -308.848 76.6783 \; -308.866 75.8629 \; -308.841
75.056 \; -308.717 74.3867 \; -308.642 74.0261 \; -308.634 74.0402
\; -308.742 74.3319 \; -308.865 74.6704 \; -308.916 75.1175 \; -309.009
76.0264 \; -309.076 77.0253 \; -309.109 77.6815 \; -309.143 77.9342
\; -309.223 77.7047 \; -309.308 77.1028 \; -309.289 76.4484 \; -309.144
75.9489 \; -309.084 75.8889 \; -309.169 76.2907 \; -309.236 76.6955
\; -309.285 76.8623 \; -309.341 76.9675 \; -309.346 77.1854 \; -309.318
77.5775 \; -309.273 78.0292 \; -309.214 78.3809 \; -309.171 78.6055
\; -309.118 78.7596 \; -309.07 78.9356 \; -309.082 79.2439 \; -309.131
79.6026 \; -309.185 79.7686 \; -309.229 79.7092 \; -309.248 79.5094
\; -309.24 79.1851 \; -309.209 78.6341 \; -309.186 77.9228 \; -309.233
77.4246 \; -309.327 77.2158 \; -309.348 77.173 \; -309.268 77.4504
\; -309.201 77.9582 \; -309.169 78.341 \; -309.148 78.2643 \; -309.083
77.5223 \; -308.942 76.4386 \; -308.813 75.6409 \; -308.79 75.5743
\; -308.91 76.3292 \; -309.038 77.4946 \; -309.142 78.6545 \; -309.241
79.6217 \; -309.303 80.3403 \; -309.322 80.869 \; -309.304 81.1926
\; -309.251 81.3606 \; -309.193 81.4641 \; -309.173 81.4543 \; -309.172
81.3199 \; \;;
#X scalar trace-template 0 0 5 \; -319.788 57.3809 \; -320.181 57.5371
\; -320.607 57.2243 \; -320.485 55.1315 \; \;;
#X scalar trace-template 0 0 4 \; -328.845 56.8844 \; -329.27 57.6407
\; -330.201 55.7891 \; \;;
#X scalar trace-template 3 -31 3 \; -338.831 65.3604 \; -338.343 65.0927
\; -337.997 67.416 \; -338.031 68.2797 \; -338.057 68.8033 \; -338.001
69.8547 \; -337.984 70.6113 \; -338.085 70.2393 \; -338.158 69.7346
\; -338.067 70.22 \; -338.039 70.7867 \; -338.082 70.6751 \; -338.083
70.2366 \; -338.051 69.8163 \; -338.064 69.421 \; -338.153 69.0985
\; -338.179 69.151 \; -338.081 69.4616 \; -338.04 69.2603 \; -338.052
68.4481 \; -337.998 67.2775 \; -338.04 65.3766 \; -338.285 63.6914
\; -338.182 64.1078 \; -338.085 64.8679 \; -338.257 64.3851 \; -338.23
64.0425 \; -338.018 64.4475 \; -338.09 64.3731 \; -338.237 64.1981
\; -338.155 64.9584 \; -338.141 65.5785 \; -338.284 65.2811 \; -338.2
65.0292 \; -338.029 65.0808 \; -338.147 64.4456 \; -338.275 64.0782
\; -338.184 64.021 \; -338.415 63.0838 \; -338.568 62.899 \; -338.185
63.7816 \; -338.225 64.0316 \; -338.349 64.1353 \; -338.077 64.9335
\; -338.024 64.9803 \; -338.229 64.0616 \; -338.165 64.0179 \; -338.02
63.9428 \; -338.154 61.9517 \; -338.287 60.0008 \; -337.903 60.4489
\; -337.827 60.7339 \; -338.12 59.8507 \; -338.161 61.4826 \; -337.965
64.5731 \; -338.021 65.6403 \; -338.258 65.4583 \; -338.193 66.1111
\; -338.036 67.1355 \; -338.092 66.8186 \; -338.278 66.0467 \; -338.251
66.4051 \; -338.251 66.9293 \; -338.438 67.028 \; -338.314 67.3133
\; -338.147 67.6987 \; -338.196 67.2544 \; -338.261 67.1296 \; -338.22
68.1024 \; -338.3 69.1793 \; -338.342 70.0634 \; -338.226 70.5581 \;
-338.227 70.0046 \; -338.369 68.6939 \; -338.266 68.0117 \; -338.129
68.0847 \; -338.25 67.8763 \; -338.352 68.2743 \; -338.217 69.2533
\; -338.214 69.6464 \; -338.272 69.5557 \; -338.179 69.9526 \; -338.18
70.3756 \; -338.345 70.4707 \; -338.342 70.9321 \; -338.22 71.3226
\; -338.249 70.8791 \; -338.274 70.2455 \; -338.152 70.1605 \; -338.148
69.9763 \; \;;
#X scalar trace-template 0 0 2 \; -344.435 50.3571 \; -344.676 53.6972
\; -344.907 57.9862 \; -345.468 59.5927 \; -345.435 57.88 \; -345.08
53.4871 \; \;;
#X scalar trace-template 0 0 1 \; -351.66 55.5817 \; -350.919 57.0657
\; \;;
#X scalar trace-template 15 0 1 \; -290.497 62.3455 \; -289.917 64.5081
\; \;;
#X scalar trace-template 20 0 4 \; -325.69 57.3878 \; \;;
#X scalar trace-template 25 0 7 \; -296.788 63.9304 \; -295.926 62.8437
\; \;;
#X scalar trace-template 25 0 5 \; -320.285 57.6772 \; -320.508 58.8425
\; -320.151 58.5278 \; -320.768 60.3968 \; -320.593 60.8226 \; -320.268
59.7789 \; -320.88 59.737 \; -320.688 59.0786 \; -320.101 59.472 \;
-320.414 60.688 \; -320.308 60.3209 \; -320.371 60.0803 \; -320.671
60.6628 \; -320.171 59.6875 \; -320.008 59.1602 \; -320.366 58.5441
\; -320.092 57.0253 \; -320.465 55.492 \; -320.279 54.4491 \; -320.299
55.7007 \; -320.472 56.8359 \; -319.766 55.3358 \; -319.842 53.2032
\; -320.037 52.6049 \; -320.513 53.2324 \; -320.556 53.7244 \; -320.127
53.3023 \; -320.255 53.3985 \; -320.563 54.1999 \; -320.37 55.1689
\; -320.402 55.0377 \; -320.088 52.8426 \; -320.169 52.1079 \; -320.421
54.144 \; -320.199 55.1952 \; -320.288 54.8076 \; -319.875 53.4492
\; -320.134 52.8401 \; -320.478 53.3816 \; -320.345 53.0761 \; -320.747
54.154 \; -320.409 55.1588 \; -320.473 56.9858 \; -320.638 58.102 \;
-320.376 56.8824 \; -320.121 56.0043 \; -320.426 55.1951 \; \;;
#X scalar trace-template 30 0 4 \; -349.771 59.2302 \; -350.03 58.4881
\; -350.375 58.8169 \; -350.455 58.2635 \; -350.341 54.9928 \; -349.617
52.0436 \; \;;
#X scalar trace-template 30 0 1 \; -356.515 53.1229 \; -356.534 52.6592
\; \;;
#X scalar trace-template 35 0 2 \; -290.388 61.5761 \; -291.357 59.1929
\; \;;
#X scalar trace-template 40 0 7 \; -300.055 55.9626 \; -297.103 61.9754
\; -296.124 66.1486 \; -295.446 68.1804 \; -295.431 68.0979 \; -295.612
67.3051 \; -296.886 64.2983 \; -297.339 62.3423 \; -295.548 62.883
\; -294.729 65.835 \; -294.983 67.6909 \; -295.394 68.3517 \; -295.061
66.0636 \; -294.226 62.315 \; -294.766 59.5051 \; -292.748 59.6254
\; \;;
#X scalar trace-template 45 0 1 \; -327.111 55.6783 \; -326.051 56.3284
\; \;;
#X scalar trace-template 50 0 2 \; -345.333 60.4566 \; -345.37 61.9942
\; -345.467 62.5947 \; -345.562 62.2511 \; -345.662 60.6462 \; -345.838
59.658 \; -345.786 60.9526 \; -345.614 62.0047 \; -345.433 61.2858
\; -345.405 59.4638 \; -345.705 57.4746 \; -345.9 55.9761 \; -345.987
53.2427 \; \;;
#X scalar trace-template 60 0 1 \; -330.141 52.7649 \; -329.759 52.496
\; -330.381 52.6431 \; \;;
#X scalar trace-template 65 0 4 \; -350.539 53.0849 \; \;;
#X scalar trace-template 75 0 4 \; -290.68 58.0518 \; \;;
#X scalar trace-template 113 -115 1 \; -268.376 67.4411 \; -267.51
69.6547 \; -267.7 69.6601 \; -268.383 68.4795 \; -267.659 68.0134 \;
-268.196 67.5265 \; -267.355 67.8782 \; -267.116 67.7008 \; -268.436
67.5944 \; -267.414 69.6193 \; -267.548 70.3795 \; -267.645 70.6548
\; -267.445 71.2117 \; -267.699 70.9501 \; -267.912 70.2365 \; -267.908
69.646 \; -268.106 69.1182 \; -267.847 69.1953 \; -267.93 68.9679 \;
-267.671 69.0811 \; -267.671 68.8746 \; -268.031 68.337 \; -267.933
68.1967 \; -268.396 67.8426 \; -268.164 68.2264 \; -267.932 69.2783
\; -267.808 69.922 \; -267.813 69.7453 \; -267.6 69.27 \; -267.335
68.7903 \; -267.872 67.5196 \; -268.28 66.5335 \; \;;
#X scalar trace-template 85 0 8 \; -356.473 47.2852 \; \;;
#X scalar trace-template 85 0 4 \; -363.412 52.7933 \; \;;
#X scalar trace-template 95 0 8 \; -349.799 56.9516 \; -349.682 58.114
\; -349.687 59.1929 \; \;;
#X scalar trace-template 95 0 4 \; -356.884 51.5826 \; \;;
#X scalar trace-template 105 0 4 \; -330.389 53.9029 \; -329.883 52.3388
\; \;;
#X scalar trace-template 115 0 8 \; -284.263 54.2523 \; -286.764 57.4093
\; -284.302 57.8219 \; \;;
#X scalar trace-template 120 0 4 \; -325.749 50.8459 \; \;;
#X scalar trace-template 120 0 2 \; -349.708 58.1553 \; \;;
#X scalar trace-template 125 0 7 \; -295.493 57.8245 \; -292.472 58.7783
\; -290.459 59.449 \; -290.142 56.291 \; \;;
#X scalar trace-template 130 0 4 \; -330.477 45.5384 \; -330.271 47.7032
\; \;;
#X scalar trace-template 130 0 2 \; -345.678 51.4742 \; \;;
#X scalar trace-template 135 0 8 \; -282.598 55.6295 \; \;;
#X scalar trace-template 140 0 2 \; -325.999 50.8365 \; -325.802 49.8431
\; \;;
#X scalar trace-template 145 0 8 \; -284.439 55.5084 \; \;;
#X scalar trace-template 145 0 4 \; -300.827 56.2008 \; \;;
#X scalar trace-template 150 0 7 \; -292.842 58.4013 \; -295.507 63.9292
\; -295.819 63.2863 \; -296.521 58.7481 \; -296.552 54.9325 \; \;;
#X scalar trace-template 155 0 8 \; -281.831 54.4155 \; -283.278 54.6575
\; -283.95 55.4649 \; -284.509 57.7758 \; -284.535 55.9143 \; \;;
#X scalar trace-template 155 0 4 \; -329.412 47.5286 \; \;;
#X scalar trace-template 155 0 2 \; -345.383 57.572 \; -345.507 60.2884
\; -345.523 60.771 \; -345.468 60.1862 \; -345.455 60.2852 \; -345.509
61.2055 \; -345.531 62.0587 \; -345.533 62.1396 \; -345.49 61.5193
\; -345.517 60.4321 \; -345.667 58.9602 \; -345.813 57.1448 \; -345.754
55.766 \; -345.54 56.4602 \; -345.628 58.9323 \; -345.746 60.646 \;
-345.77 60.0663 \; -345.676 58.1189 \; -345.639 57.3838 \; -345.742
58.2583 \; -345.838 58.7581 \; -345.81 57.6209 \; -345.65 54.6219 \;
-345.623 51.4752 \; -345.785 51.3769 \; -345.762 53.1201 \; -345.679
54.497 \; -345.589 55.0109 \; -345.378 54.429 \; -345.454 53.1154 \;
-345.782 50.7676 \; -346.038 46.6522 \; \;;
#X scalar trace-template 165 0 4 \; -325.894 48.8069 \; \;;
#X scalar trace-template 175 0 4 \; -356.334 50.4569 \; -356.247 48.779
\; \;;
#X scalar trace-template 180 0 7 \; -301.117 55.838 \; \;;
#X scalar trace-template 185 0 8 \; -293.464 57.0721 \; -293.753 57.0661
\; -294.981 57.0223 \; -297.216 56.2156 \; \;;
#X scalar trace-template 190 0 7 \; -284.577 56.1343 \; -285.086 55.975
\; -286.97 53.0988 \; -287.551 52.728 \; -286.578 55.3239 \; -284.885
56.8688 \; \;;
#X scalar trace-template 190 0 4 \; -329.396 44.9186 \; \;;
#X scalar trace-template 200 0 4 \; -356.528 50.0702 \; -356.496 50.6276
\; \;;
#X scalar trace-template 210 0 8 \; -295.441 55.6799 \; -294.951 58.3704
\; -295.644 61.4334 \; -297.353 62.7345 \; -296.066 61.0116 \; -295.537
60.5778 \; -295.446 60.8182 \; -295.239 58.1317 \; \;;
#X scalar trace-template 215 0 4 \; -330.67 41.5127 \; \;;
#X scalar trace-template 225 0 7 \; -356.732 50.5829 \; \;;
#X scalar trace-template 225 0 4 \; -360.188 48.7845 \; \;;
#X scalar trace-template 235 0 7 \; -284.799 58.4955 \; -287.641 56.0973
\; \;;
#X scalar trace-template 235 0 4 \; -329.661 51.9938 \; -330.138 53.1038
\; -329.39 54.2691 \; -329.734 53.1496 \; \;;
#X scalar trace-template 245 0 1 \; -260.175 66.9136 \; \;;
#X scalar trace-template 250 0 7 \; -267.795 67.3388 \; -268.428 67.3402
\; -267.07 68.3468 \; -267.837 66.8513 \; \;;
#X scalar trace-template 255 0 8 \; -284.316 57.3983 \; -283.738 54.7765
\; \;;
#X scalar trace-template 255 0 1 \; -325.406 52.7829 \; -324.615 54.9147
\; -324.294 57.288 \; -324.203 57.6853 \; -324.273 56.0984 \; -324.209
53.9155 \; -325.029 52.9128 \; -325.562 55.9452 \; -324.674 57.6779
\; -324.482 58.8515 \; -324.643 57.2996 \; -324.523 53.9698 \; \;;
#X scalar trace-template 260 0 4 \; -295.676 57.6808 \; -295.75 61.0421
\; -297.136 60.2708 \; -296.992 56.8811 \; \;;
#X scalar trace-template 265 0 5 \; -330.003 52.1627 \; -329.553 53.0198
\; -330.136 52.8048 \; -330.274 50.2378 \; \;;
#X scalar trace-template 270 0 8 \; -260.362 66.6159 \; -259.998 68.775
\; -260.288 70.3227 \; -259.894 69.741 \; -259.523 69.4534 \; -259.486
69.6885 \; -259.472 69.4197 \; -259.617 67.6515 \; -262.87 64.1605
\; -267.153 62.3537 \; -268.824 61.8898 \; -267.318 64.0126 \; \;;
#X scalar trace-template 275 0 7 \; -284.716 57.0074 \; -284.733 55.4572
\; -281.928 50.336 \; \;;
#X scalar trace-template 285 0 4 \; -295.401 56.6608 \; -295.098 61.4652
\; -294.829 63.4592 \; -294.418 63.3665 \; -294.913 61.2281 \; -290.185
54.9899 \; \;;
#X scalar trace-template 290 0 5 \; -349.939 56.9469 \; -349.947 58.3829
\; -349.905 58.8964 \; -349.904 58.0441 \; \;;
#X scalar trace-template 295 0 7 \; -284.524 52.6894 \; -284.753 54.1151
\; \;;
#X scalar trace-template 310 0 7 \; -296.863 57.1286 \; \;;
#X scalar trace-template 315 0 5 \; -284.816 53.9214 \; -284.596 54.9496
\; \;;
#X scalar trace-template 320 0 7 \; -320.171 51.9045 \; -320.347 51.3616
\; -322.505 53.1322 \; -324.186 54.2687 \; -324.502 54.4695 \; \;;
#X scalar trace-template 320 0 4 \; -329.516 50.9914 \; -329.725 49.6337
\; -329.542 49.0654 \; \;;
#X scalar trace-template 320 0 2 \; -350.616 44.3007 \; -349.136 39.8323
\; -349.706 44.8691 \; -349.938 50.5439 \; -350.159 53.5943 \; -350.112
55.4278 \; \;;
#X scalar trace-template 320 0 1 \; -363.542 53.8649 \; \;;
#X scalar trace-template 330 0 5 \; -259.247 64.5953 \; -259.259 67.1753
\; -259.361 68.9221 \; -259.778 70.1734 \; -259.63 70.295 \; -259.791
69.9517 \; -258.949 67.496 \; \;;
#X scalar trace-template 330 0 1 \; -294.874 59.6277 \; -294.569 60.6568
\; -293.491 60.5702 \; -295.325 59.6616 \; -295.557 58.3896 \; -294.992
56.3442 \; -294.978 55.5158 \; -292.896 56.9972 \; -292.411 58.1426
\; -289.819 58.4956 \; -291.533 55.9555 \; -291.911 56.1568 \; -289.755
56.6256 \; -290.9 54.5125 \; -291.945 57.3661 \; -290.122 58.9368 \;
-286.596 55.7548 \; \;;
#X scalar trace-template 335 0 9 \; -237.005 59.1482 \; -238.073 61.6695
\; -238.836 63.0239 \; -239.009 62.1566 \; -238.742 60.0554 \; -239.431
59.83 \; -239.46 61.1191 \; -239.544 61.8287 \; -240.597 62.3122 \;
-240.803 62.7475 \; -240.157 62.7397 \; -240.643 62.9889 \; -240.646
63.5014 \; -239.535 62.9037 \; -238.322 61.0068 \; -239.465 60.0128
\; -240.84 59.9064 \; \;;
#X scalar trace-template 335 0 8 \; -345.352 53.4543 \; -345.419 54.423
\; -345.578 54.6303 \; -345.653 53.7819 \; -345.435 50.5486 \; -344.958
47.408 \; -344.949 45.1376 \; \;;
#X scalar trace-template 340 0 4 \; -359.773 42.1258 \; \;;
#X scalar trace-template 350 0 7 \; -281.74 47.8143 \; \;;
#X scalar trace-template 350 0 4 \; -319.707 53.5851 \; \;;
#X scalar trace-template 355 0 2 \; -324.763 55.4632 \; -324.598 58.0268
\; -324.417 58.4832 \; -324.31 57.1883 \; -324.716 53.63 \; -324.911
52.6199 \; \;;
#X scalar trace-template 360 0 7 \; -286.767 55.6536 \; -285.371 56.8644
\; \;;
#X scalar trace-template 360 0 4 \; -350.076 58.1741 \; \;;
#X scalar trace-template 370 0 5 \; -267.823 66.7676 \; -267.617 66.2574
\; -268.521 64.7118 \; -267.715 64.1857 \; -268.197 63.5378 \; \;;
#X scalar trace-template 370 0 4 \; -300.553 54.778 \; -298.021 52.3256
\; -298.507 54.8007 \; -300.353 55.6097 \; \;;
#X scalar trace-template 375 0 8 \; -329.626 44.5155 \; -330.072 42.9968
\; -330.81 42.5293 \; -330.889 42.7742 \; -330.559 42.9291 \; -331.103
41.2239 \; \;;
#X scalar trace-template 375 0 7 \; -350.292 55.4035 \; \;;
#X scalar trace-template 385 0 7 \; -320.39 52.7026 \; \;;
#X scalar trace-template 390 0 2 \; -324.542 55.3817 \; -324.707 57.0009
\; -324.544 57.5226 \; -324.899 55.5216 \; \;;
#X scalar trace-template 395 0 7 \; -259.027 64.4146 \; -259.007 66.9203
\; -259.441 69.1434 \; -259.5 70.1276 \; -259.89 70.7056 \; -259.916
69.7508 \; -260.128 68.3644 \; -260.331 65.6348 \; -267.385 63.6946
\; \;;
#X scalar trace-template 395 0 4 \; -350.225 56.0847 \; -350.217 58.4649
\; -350.1 59.1759 \; \;;
#X scalar trace-template 400 0 5 \; -345.488 51.8104 \; -345.665 52.719
\; -345.633 50.7978 \; -345.605 48.4163 \; -345.948 47.7253 \; -346.224
49.8565 \; -345.932 52.1893 \; -345.638 53.757 \; -345.479 53.9585
\; -345.43 53.4346 \; \;;
#X scalar trace-template 410 0 8 \; -300.379 54.217 \; -297.547 58.6683
\; -295.217 59.6517 \; -292.936 55.7664 \; -295.09 54.4867 \; \;;
#X scalar trace-template 415 0 4 \; -320.477 53.3217 \; \;;
#X scalar trace-template 415 0 2 \; -330.91 44.7758 \; -330.491 46.8739
\; -330.23 48.1383 \; -330.09 48.4249 \; \;;
#X scalar trace-template 420 0 1 \; -324.662 52.6471 \; -324.826 53.9825
\; -324.672 55.4613 \; \;;
#X scalar trace-template 425 0 9 \; -299.778 57.1575 \; \;;
#X scalar trace-template 425 0 4 \; -350.297 55.9899 \; \;;
#X scalar trace-template 435 0 9 \; -238.899 61.5224 \; -239.72 62.7197
\; -240.208 62.8918 \; \;;
#X scalar trace-template 435 0 4 \; -290.04 57.5717 \; -289.683 58.866
\; -285.585 57.3138 \; \;;
#X scalar trace-template 440 0 8 \; -299.946 52.3215 \; -295.495 53.742
\; \;;
#X scalar trace-template 440 0 2 \; -320.287 54.1989 \; \;;
#X scalar trace-template 440 0 1 \; -350.833 47.8947 \; -350.51 51.3149
\; \;;
#X scalar trace-template 445 0 7 \; -267.276 64.2333 \; \;;
#X restore 351 494 pd trace-list;
#N canvas 56 84 527 179 trace-template 0;
#X obj 121 72 plot bazoo 0 1 0 500 5;
#X obj 125 36 template float x float y float voiceno array bazoo point-template
;
#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 restore 351 537 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 obj 212 14 template float y float amp;
#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 restore 351 557 pd point-template;
#X msg 746 506 bang;
#X obj 8 425 pack 0 100;
#X obj 8 449 line~;
#X obj 8 405 dbtorms;
#X floatatom 545 70 0 0 0 0 - - -;
#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;
#X restore 820 69 pd output;
#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;
#X restore 545 50 pd;
#N canvas 209 96 518 375 fft 0;
#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 /;
#X obj 170 103 bang~;
#X obj 169 175 line~;
#X obj 238 104 * 1000;
#X text 298 104 window size (msec);
#X obj 168 281 rfft~;
#X obj 170 337 tabsend~ fft-real;
#X obj 207 307 tabsend~ fft-imag;
#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 -~;
#X obj 81 301 *~;
#X obj 81 324 outlet~;
#X floatatom 429 252 0 0 0 0 - - -;
#X obj 53 127 s fft-done;
#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;
#X connect 2 0 16 0;
#X connect 2 1 16 1;
#X connect 3 0 0 0;
#X connect 3 0 29 1;
#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;
#X connect 8 0 19 0;
#X connect 8 0 26 0;
#X connect 9 0 21 0;
#X connect 9 0 21 1;
#X connect 9 0 22 1;
#X connect 9 0 29 0;
#X connect 10 0 19 1;
#X connect 12 0 13 0;
#X connect 12 1 14 0;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 17 0 25 0;
#X connect 17 0 30 1;
#X connect 19 0 20 0;
#X connect 20 0 9 0;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X connect 23 0 24 0;
#X connect 28 0 12 0;
#X connect 28 0 23 1;
#X connect 29 0 30 0;
#X connect 30 0 28 0;
#X restore 22 470 pd fft;
#X obj 8 493 *~;
#X obj 9 544 hip~ 5;
#X obj 9 571 dac~;
#X obj 754 529 adc~;
#X obj 545 91 s loop-amp;
#X msg 820 48 mute;
#X text 18 97 click here first;
#X text 741 489 live sample;
#X text 677 25 AMPLITUDES;
#N canvas 5 1 864 622 make-trace 0;
#X obj 186 220 * -0.33333;
#X obj 91 216 * 10;
#X obj 118 136 pointer;
#X msg 118 115 next;
#X obj 118 97 until;
#X obj 387 134 pointer;
#X msg 389 108 next;
#X obj 200 330 unpack;
#X obj 255 332 s amp;
#X obj 283 378 s frequency;
#X obj 300 361 s pitch;
#X obj 251 375 f 0;
#X obj 200 348 t b b b b f;
#X obj 781 133 pointer;
#X obj 744 602 setsize trace-template bazoo;
#X obj 744 514 random 200;
#X obj 744 532 + 100;
#X obj 857 526 pointer;
#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;
#X msg 508 447 next;
#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;
#X msg 744 497 bang;
#X obj 744 549 append trace-template x;
#X obj 519 489 get trace-template x y;
#X obj 744 567 t b p;
#X msg 744 584 5;
#X obj 816 93 s clear-traces;
#X obj 783 155 s last-in-list;
#X msg 780 43 bang;
#X obj 780 60 t b b;
#X obj 745 156 f 0;
#X obj 744 176 s nframe;
#X obj 445 337 r nframe;
#X obj 429 356 f;
#X obj 429 373 + 1;
#X obj 429 391 s nframe;
#X obj 429 296 r done-frame;
#X obj 437 315 s done-adding-traces;
#X obj 19 309 r component;
#X obj 19 326 unpack;
#X obj 73 331 s amp;
#X obj 104 370 s frequency;
#X obj 120 354 s pitch;
#X obj 70 388 s added-to-trace;
#X obj 70 370 f 0;
#X obj 62 408 s add-to-trace;
#X obj 19 344 t b b b b f;
#X obj 780 25 r clear-all;
#X obj 200 311 r component2;
#X obj 251 393 s started-new-trace;
#X obj 240 414 s start-new-trace;
#X obj 355 41 r done-analysis;
#X obj 355 62 t b b b b;
#X obj 292 176 r added-to-trace;
#X obj 389 89 until;
#X obj 456 172 get peak-template x amp;
#X obj 552 195 * -0.33333;
#X obj 456 190 * 10;
#X obj 456 210 pack;
#X obj 456 226 s component;
#X obj 120 337 ftom;
#X obj 387 155 t b p p;
#X obj 256 196 set peak-template used;
#X obj 259 176 f;
#X obj 302 344 ftom;
#X msg 175 31 \; done-frame bang;
#X obj 21 178 get peak-template used x amp;
#X obj 35 236 pack 0 0 0;
#X obj 35 255 route 0;
#X obj 35 272 s component2;
#X obj 549 260 print x1;
#X obj 226 276 print x2;
#X obj 727 255 add-trace 1;
#X obj 728 274 add-trace 2;
#X obj 728 291 add-trace 3;
#X obj 727 309 add-trace 4;
#X obj 728 328 add-trace 5;
#X obj 728 345 add-trace 6;
#X obj 728 363 add-trace 7;
#X obj 729 381 add-trace 8;
#X obj 729 399 add-trace 9;
#X obj 729 417 add-trace 10;
#X msg 484 111 traverse pd-peak-list;
#X msg 781 115 traverse pd-trace-list \, bang;
#X msg 833 59 \; pd-trace-list clear;
#X msg 481 430 traverse pd-trace-list \, next;
#X msg 857 509 traverse pd-trace-list \, bang;
#X connect 0 0 84 2;
#X connect 1 0 84 1;
#X connect 2 0 83 0;
#X connect 2 1 4 1;
#X connect 3 0 2 0;
#X connect 4 0 3 0;
#X connect 5 0 78 0;
#X connect 5 1 71 1;
#X connect 6 0 5 0;
#X connect 7 0 12 0;
#X connect 7 1 8 0;
#X connect 11 0 66 0;
#X connect 12 2 67 0;
#X connect 12 3 11 0;
#X connect 12 4 81 0;
#X connect 12 4 9 0;
#X connect 13 0 44 0;
#X connect 15 0 16 0;
#X connect 16 0 39 0;
#X connect 17 0 39 1;
#X connect 18 0 32 0;
#X connect 19 0 37 0;
#X connect 20 0 35 0;
#X connect 21 0 18 0;
#X connect 22 0 34 0;
#X connect 23 0 33 0;
#X connect 26 0 36 0;
#X connect 28 0 35 1;
#X connect 28 0 36 1;
#X connect 28 0 37 1;
#X connect 28 0 34 1;
#X connect 28 0 40 0;
#X connect 28 0 31 0;
#X connect 29 0 28 0;
#X connect 31 0 25 0;
#X connect 32 0 24 0;
#X connect 34 0 18 0;
#X connect 34 0 33 1;
#X connect 38 0 15 0;
#X connect 39 0 41 0;
#X connect 40 0 30 0;
#X connect 40 1 27 0;
#X connect 41 0 42 0;
#X connect 41 1 14 1;
#X connect 42 0 14 0;
#X connect 45 0 46 0;
#X connect 46 0 100 0;
#X connect 46 0 47 0;
#X connect 46 1 101 0;
#X connect 46 1 43 0;
#X connect 47 0 48 0;
#X connect 49 0 50 1;
#X connect 50 0 51 0;
#X connect 51 0 52 0;
#X connect 53 0 50 0;
#X connect 53 0 54 0;
#X connect 55 0 56 0;
#X connect 56 0 63 0;
#X connect 56 1 57 0;
#X connect 61 0 60 0;
#X connect 63 2 62 0;
#X connect 63 3 61 0;
#X connect 63 4 77 0;
#X connect 63 4 58 0;
#X connect 64 0 45 0;
#X connect 65 0 7 0;
#X connect 68 0 69 0;
#X connect 69 0 82 0;
#X connect 69 1 4 0;
#X connect 69 2 71 0;
#X connect 69 3 99 0;
#X connect 70 0 80 1;
#X connect 71 0 6 0;
#X connect 72 0 74 0;
#X connect 72 1 73 0;
#X connect 73 0 75 1;
#X connect 74 0 75 0;
#X connect 75 0 76 0;
#X connect 77 0 59 0;
#X connect 78 0 80 0;
#X connect 78 1 79 1;
#X connect 78 2 72 0;
#X connect 80 0 79 0;
#X connect 81 0 10 0;
#X connect 83 0 84 0;
#X connect 83 1 1 0;
#X connect 83 2 0 0;
#X connect 84 0 85 0;
#X connect 85 0 86 0;
#X connect 99 0 5 0;
#X connect 99 0 2 0;
#X connect 100 0 13 0;
#X connect 102 0 28 0;
#X connect 103 0 17 0;
#X restore 351 474 pd make-trace;
#X floatatom 5 289 0 0 0 0 - - -;
#N canvas 0 0 955 721 arrays 0;
#X msg 39 202 \; fft-real resize 4096 \; fft-imag resize 4096;
#N canvas 0 0 450 300 graph1 0;
#X array fft-real 4096 float 0;
#X coords 0 1 4096 -1 400 300 1;
#X restore 432 41 graph;
#N canvas 0 0 450 300 graph2 0;
#X array fft-imag 4096 float 0;
#X coords 0 1 4096 -1 400 300 1;
#X restore 419 265 graph;
#X restore 571 515 pd arrays;
#X obj 5 309 s location;
#X obj 123 412 r loop-amp;
#X obj 737 288 f;
#X obj 5 248 r location;
#X msg 5 268 set \$1;
#X obj 777 288 +;
#X obj 737 309 moses 900;
#X msg 695 329 0;
#X msg 694 247 1;
#X msg 736 335 \; location \$1 \; snapshot bang;
#X msg 655 170 bang \; location 0 \; clear-all bang;
#X floatatom 655 305 0 0 0 0 - - -;
#X obj 655 225 t b b;
#X obj 838 270 r incr;
#X obj 8 385 r grain-amp;
#X obj 121 473 r osc-amp;
#X obj 143 553 catch~ osc-sum;
#N canvas 102 67 751 619 osc-bank 0;
#X obj 311 433 osc-voice;
#X obj 290 451 osc-voice;
#X obj 269 471 osc-voice;
#X obj 248 490 osc-voice;
#X obj 227 510 osc-voice;
#X obj 207 528 osc-voice;
#X obj 186 547 osc-voice;
#X obj 165 566 osc-voice;
#X obj 144 586 osc-voice;
#X obj 123 410 route 1 2 3 4 5 6 7 8 9 10;
#X msg 377 269 0;
#X obj 728 489 pointer;
#X floatatom 848 417 0 0 0 0 - - -;
#X obj 623 351 pointer;
#X msg 549 491 next;
#X floatatom 623 419 0 0 0 0 - - -;
#X obj 231 111 pointer;
#X floatatom 368 104 0 0 0 0 - - -;
#X floatatom 309 129 0 0 0 0 - - -;
#X msg 218 88 bang;
#X floatatom 120 40 0 0 0 0 - - -;
#X floatatom 53 88 0 0 0 0 - - -;
#X floatatom 165 169 0 0 0 0 - - -;
#X floatatom 546 137 0 0 0 0 - - -;
#X floatatom 368 69 0 0 0 0 - - -;
#X floatatom 680 90 0 0 0 0 - - -;
#X obj 552 43 pointer;
#X msg 581 27 next;
#X floatatom 545 92 0 0 0 0 - - -;
#X obj 546 120 getsize trace-template bazoo;
#X obj 140 142 get point-template y;
#X obj 53 113 set point-template y;
#X obj 113 66 element trace-template bazoo;
#X obj 309 159 setsize trace-template bazoo;
#X obj 368 86 set trace-template x;
#X obj 368 121 set trace-template y;
#X obj 532 68 get trace-template x y;
#X floatatom 524 312 0 0 0 0 - - -;
#X msg 524 288 1;
#X msg 564 288 0;
#X obj 623 451 <;
#X obj 623 398 get trace-template x voiceno;
#X obj 623 374 t p p;
#X obj 393 337 until;
#X obj 620 233 r start-resynth;
#X obj 625 255 t b b;
#X obj 504 353 f;
#X obj 504 372 sel 0 1;
#X obj 668 436 r synth-index;
#X obj 621 555 pack f p;
#X obj 623 470 sel 0 1;
#X obj 305 230 r step-resynth;
#X obj 378 288 f;
#X obj 378 308 s synth-index;
#X obj 636 523 f;
#X obj 419 289 + 5;
#X obj 621 490 t b b b;
#X obj 305 252 t b b b;
#X obj 281 301 s osc-tick;
#X obj 123 604 osc-voice;
#X msg 552 10 traverse pd-trace-list \, next;
#X msg 621 288 traverse pd-trace-list \, next;
#X connect 9 0 59 0;
#X connect 9 1 8 0;
#X connect 9 2 7 0;
#X connect 9 3 6 0;
#X connect 9 4 5 0;
#X connect 9 5 4 0;
#X connect 9 6 3 0;
#X connect 9 7 2 0;
#X connect 9 8 1 0;
#X connect 9 9 0 0;
#X connect 10 0 52 0;
#X connect 11 0 49 1;
#X connect 13 0 42 0;
#X connect 13 1 39 0;
#X connect 13 1 43 1;
#X connect 14 0 13 0;
#X connect 15 0 40 0;
#X connect 16 0 30 0;
#X connect 17 0 35 0;
#X connect 18 0 33 0;
#X connect 19 0 16 0;
#X connect 20 0 32 0;
#X connect 21 0 31 0;
#X connect 24 0 34 0;
#X connect 26 0 33 1;
#X connect 26 0 34 1;
#X connect 26 0 35 1;
#X connect 26 0 32 1;
#X connect 26 0 36 0;
#X connect 26 0 29 0;
#X connect 27 0 26 0;
#X connect 29 0 23 0;
#X connect 30 0 22 0;
#X connect 32 0 16 0;
#X connect 32 0 31 1;
#X connect 36 0 28 0;
#X connect 36 1 25 0;
#X connect 37 0 46 1;
#X connect 38 0 37 0;
#X connect 39 0 37 0;
#X connect 40 0 50 0;
#X connect 41 0 15 0;
#X connect 41 1 54 1;
#X connect 42 0 41 0;
#X connect 42 1 11 1;
#X connect 43 0 46 0;
#X connect 44 0 45 0;
#X connect 45 0 61 0;
#X connect 45 1 38 0;
#X connect 45 1 10 0;
#X connect 46 0 47 0;
#X connect 47 0 43 1;
#X connect 47 1 15 0;
#X connect 48 0 40 1;
#X connect 49 0 9 0;
#X connect 50 0 43 1;
#X connect 50 1 56 0;
#X connect 51 0 57 0;
#X connect 52 0 53 0;
#X connect 52 0 55 0;
#X connect 54 0 49 0;
#X connect 55 0 52 1;
#X connect 56 0 14 0;
#X connect 56 1 54 0;
#X connect 56 2 11 0;
#X connect 57 0 58 0;
#X connect 57 1 43 0;
#X connect 57 2 52 0;
#X connect 60 0 26 0;
#X connect 61 0 13 0;
#X restore 571 494 pd osc-bank;
#X obj 646 95 s grain-amp;
#N canvas 31 70 662 326 save-list 0;
#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 - - -;
#X obj 435 206 pointer;
#X obj 307 121 pointer;
#X msg 328 47 bang;
#X obj 152 200 rmstodb;
#X obj 10 201 * 0.1;
#X obj 151 220 * -3;
#X floatatom 445 247 0 0 0 0 - - -;
#X obj 304 27 r start-analysis;
#X obj 305 71 t b b;
#X msg 456 185 next;
#X obj 430 227 get peak-template x y amp ampreal ampimag;
#X obj 9 241 append peak-template x y amp ampreal ampimag;
#X obj 125 138 r found-peak;
#X obj 126 161 unpack 0 0 0 0 0;
#X msg 81 201 330;
#X msg 356 69 \; pd-peak-list clear;
#X msg 305 100 traverse pd-peak-list \, bang;
#X msg 437 166 traverse pd-peak-list \, next;
#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 351 431 pd save-list;
#X msg 9 114 \; pd dsp 1 \; window-size 2048 \; sample-rate 44100 \;
f-threshold 40 \; incr 10 \; clear-all bang;
#X obj 737 245 metro 150;
#X floatatom 315 309 0 0 0 0 - - -;
#X floatatom 377 309 0 0 0 0 - - -;
#X msg 139 349 \; start-resynth bang;
#X msg 315 350 \; step-resynth bang;
#X obj 315 329 metro 100;
#X msg 478 350 \; osc-stop bang;
#X text 790 113 resynth;
#X text 642 112 analyzed grains;
#X text 554 112 original;
#X text 653 151 ... and here third to analyze;
#N canvas 0 0 276 216 test 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 connect 0 0 1 0;
#X restore 569 538 pd test;
#X text 317 140 read a sample;
#X msg 214 163 \; read-sample ../sound/bell.aiff 44100;
#X msg 213 200 \; read-sample ../sound/voice.wav 32000;
#N canvas 190 43 405 461 test-signal 0;
#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;
#X restore 125 436 pd test-signal;
#N canvas 132 255 634 331 insample 0;
#N canvas 0 0 450 300 graph1 0;
#X array sample 155948 float 0;
#X coords 0 1 155947 -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 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;
#X restore 569 559 pd insample;
#X obj 744 553 tabwrite~ sample;
#X text 152 0 SINUSOID TRACKING;
#X text 129 259 to resynthesize \, "start" once and "step" ad lib.
To stop \, stop stepping and hit osc-stop. Note resynth ampliture control
above.;
#X text 4 17 This patch tries to reconstruct sinusoidal "tracks" from
a sampled sound using pique~ and the data structure facilities. It
turns out to be quite hard \, not least because pique~ 0.1 puts out
all sorts of spurious peaks.;
#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 28 0;
#X connect 7 0 60 1;
#X connect 8 0 41 1;
#X connect 9 0 60 0;
#X connect 10 0 44 1;
#X connect 11 0 57 0;
#X connect 12 0 11 0;
#X connect 19 0 77 0;
#X connect 20 0 21 0;
#X connect 21 0 27 0;
#X connect 22 0 20 0;
#X connect 23 0 31 0;
#X connect 25 0 23 0;
#X connect 26 0 27 1;
#X connect 27 0 28 0;
#X connect 28 0 29 0;
#X connect 28 0 29 1;
#X connect 30 0 77 0;
#X connect 32 0 24 0;
#X connect 37 0 39 0;
#X connect 40 0 75 0;
#X connect 41 0 44 0;
#X connect 41 0 45 0;
#X connect 41 0 50 0;
#X connect 42 0 43 0;
#X connect 43 0 37 0;
#X connect 44 0 41 1;
#X connect 45 0 48 0;
#X connect 45 1 46 0;
#X connect 46 0 9 0;
#X connect 47 0 9 0;
#X connect 49 0 51 0;
#X connect 51 0 47 0;
#X connect 51 1 8 0;
#X connect 52 0 10 0;
#X connect 53 0 22 0;
#X connect 54 0 5 0;
#X connect 55 0 6 1;
#X connect 60 0 41 0;
#X connect 61 0 65 0;
#X connect 62 0 65 1;
#X connect 65 0 64 0;
#X connect 75 0 28 0;