-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathreactor.pd
More file actions
1650 lines (1650 loc) · 45.2 KB
/
reactor.pd
File metadata and controls
1650 lines (1650 loc) · 45.2 KB
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
#N canvas 80 25 1331 779 10;
#X text 19 20 REACTIVE;
#X text 33 46 Reator Musical v.5.8;
#X obj 51 101 cnv 12 498 638 empty empty empty 4 8 0 11 -258043 -66577
0;
#X text 1145 853 REACTIVE (C) LATM - 2021;
#N canvas 0 50 450 278 (subpatch) 0;
#X array Som_1 10 float 2;
#X coords 0 1 10 -1 150 100 1 0 0;
#X restore 69 185 graph;
#N canvas 0 50 450 278 (subpatch) 0;
#X array Som_2 100 float 3;
#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0;
#X coords 0 1 100 -1 150 100 1 0 0;
#X restore 380 182 graph;
#X obj 71 513 vradio 15 1 0 4 empty empty empty 0 -8 0 10 -262144 -1
-1 0;
#N canvas 0 50 450 250 (subpatch) 0;
#X array Novo_Som 100 float 3;
#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0;
#X coords 0 1 99 -1 150 100 1 0 0;
#X restore 225 492 graph;
#X obj 179 381 hsl 50 10 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 180 364 hsl 50 10 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 363 770 *~;
#N canvas 88 56 707 614 vol 0;
#X floatatom 103 159 8 0 0 0 - - -;
#X msg 163 71 start;
#X msg 158 95 stop;
#X obj 103 118 pvu~ 300 300 -0.01;
#X obj 103 241 faixa;
#X floatatom 117 354 5 0 0 0 - - -;
#X obj 245 163 loadbang;
#X msg 145 207 -199.9;
#X msg 204 208 -0.001;
#X msg 263 210 0.001;
#X msg 315 211 100;
#X obj 72 391 outlet;
#X obj 86 50 inlet~;
#X connect 0 0 4 0;
#X connect 1 0 3 0;
#X connect 2 0 3 0;
#X connect 3 0 0 0;
#X connect 4 0 5 0;
#X connect 4 0 11 0;
#X connect 6 0 7 0;
#X connect 6 0 8 0;
#X connect 6 0 9 0;
#X connect 6 0 10 0;
#X connect 7 0 4 1;
#X connect 8 0 4 2;
#X connect 9 0 4 3;
#X connect 10 0 4 4;
#X connect 12 0 3 0;
#X restore 581 200 pd vol;
#N canvas 155 23 607 489 vol 0;
#X floatatom 103 159 8 0 0 0 - - -;
#X msg 163 71 start;
#X msg 158 95 stop;
#X obj 103 118 pvu~ 300 300 -0.01;
#X obj 103 241 faixa;
#X floatatom 117 354 5 0 0 0 - - -;
#X obj 245 163 loadbang;
#X msg 145 207 -199.9;
#X msg 204 208 -0.001;
#X msg 263 210 0.001;
#X msg 315 211 100;
#X obj 72 391 outlet;
#X obj 86 50 inlet~;
#X connect 0 0 4 0;
#X connect 1 0 3 0;
#X connect 2 0 3 0;
#X connect 3 0 0 0;
#X connect 4 0 5 0;
#X connect 4 0 11 0;
#X connect 6 0 7 0;
#X connect 6 0 8 0;
#X connect 6 0 9 0;
#X connect 6 0 10 0;
#X connect 7 0 4 1;
#X connect 8 0 4 2;
#X connect 9 0 4 3;
#X connect 10 0 4 4;
#X connect 12 0 3 0;
#X restore 752 200 pd vol;
#X floatatom 581 220 5 0 0 0 - - -;
#X floatatom 752 220 5 0 0 0 - - -;
#X obj 70 139 bng 20 250 50 0 empty empty Load -5 -6 0 10 -257985 -1
-1;
#X obj 106 138 bng 20 250 50 0 empty \$1 Play -1 -6 0 10 -257985 -1
-1;
#X obj 144 138 bng 20 250 50 0 empty empty Stop -5 -6 0 10 -257985
-1 -1;
#X text 138 105 Som 1;
#X obj 382 137 bng 20 250 50 0 empty empty Load -5 -6 0 10 -260097
-1 -1;
#X obj 416 138 bng 20 250 50 0 empty \$1 Play -1 -6 0 10 -260097 -1
-1;
#X obj 453 138 bng 20 250 50 0 empty empty Stop -5 -6 0 10 -260097
-1 -1;
#X text 448 104 Som 2;
#X floatatom 131 635 4 0 10 0 - - -;
#X floatatom 131 659 4 0 10 0 - - -;
#X obj 432 772 *~;
#X obj 398 771 *~;
#N canvas 44 39 731 386 v12 0;
#X floatatom 172 136 10 0 0 0 - - -;
#X obj 139 14 inlet;
#X obj 201 14 inlet;
#X text 133 136 v12;
#X obj 172 182 outlet;
#X obj 417 64 expr 10*log10((10*pow(10 \, $f1/10))+(10*pow(10 \, $f2/10)))
, f 29;
#X floatatom 417 106 5 0 0 0 - - -;
#X floatatom 417 43 5 0 0 0 - - -;
#X floatatom 564 43 5 0 0 0 - - -;
#X obj 139 64 expr (1/253.01)*10*log10((10*pow(10 \, $f1/10))+(10*pow(10
\, $f2/10))), f 29;
#X obj 284 43 t b f;
#X text 253 139 v12 = soma do NPS de q1 e q2 em dB;
#X connect 0 0 4 0;
#X connect 1 0 9 0;
#X connect 2 0 10 0;
#X connect 5 0 6 0;
#X connect 7 0 5 0;
#X connect 8 0 5 1;
#X connect 9 0 0 0;
#X connect 10 0 9 0;
#X connect 10 1 9 1;
#X coords 0 -1 1 1 110 25 2 130 130;
#X restore 931 307 pd v12;
#N canvas 53 57 1226 676 reatividade 0;
#X floatatom 193 166 5 0 0 0 - - -;
#X text 274 174 max:;
#X text 274 159 min:;
#X obj 161 44 inlet;
#X obj 239 44 inlet;
#X text 163 166 r12;
#X obj 160 211 outlet;
#X text 449 436 reatividade = [dist.tonal * Vm * (bpm1-bp2)]/reatMAX
;
#X obj 471 92 t b f;
#X obj 160 117 expr ($f1)*($f2);
#N canvas 512 184 560 307 seletor 0;
#X obj 87 120 == 0;
#X obj 144 120 == 1;
#X floatatom 113 97 5 0 0 0 - - -;
#X obj 140 78 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 139 8 inlet;
#X obj 40 217 outlet;
#X obj 92 217 outlet;
#X obj 142 34 hradio 12 1 0 2 empty empty empty 0 -8 0 10 -228856 -1
-1 0;
#X obj 40 168 spigot;
#X obj 127 168 spigot;
#X obj 40 10 inlet;
#X floatatom 160 142 5 0 0 0 - - -;
#X floatatom 73 141 5 0 0 0 - - -;
#X text 167 32 sel.1->2;
#X connect 0 0 12 0;
#X connect 1 0 11 0;
#X connect 2 0 1 0;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X connect 4 0 7 0;
#X connect 7 0 2 0;
#X connect 8 0 5 0;
#X connect 9 0 6 0;
#X connect 10 0 8 0;
#X connect 10 0 9 0;
#X connect 11 0 9 1;
#X connect 12 0 8 1;
#X coords 0 -1 1 1 80 20 2 140 30;
#X restore 258 65 pd seletor;
#X obj 510 137 /;
#X msg 495 114 1;
#X obj 209 93 t b f;
#X obj 377 90 faixa;
#X floatatom 356 71 5 0 1 0 - - -;
#X floatatom 363 183 5 0 0 0 - - -;
#X text 157 16 r12 = v12 * dist.tonal;
#X text 337 17 r12 = v12 * 1/dist.tonal, f 65;
#X obj 173 139 average 10;
#X obj 357 43 loadbang;
#X msg 433 70 1;
#X msg 399 70 0;
#X obj 236 168 hradio 12 1 0 2 empty empty empty 0 -8 0 10 -228856
-1 -1 0;
#X text 312 175 1;
#X text 312 159 0;
#X text 235 201 Seletor:;
#X text 260 236 dir: reatividade inversa com dist. tonal;
#X text 259 219 esq: reatividade proporcional à dist.tonal;
#X text 405 391 Futuro:;
#X text 404 414 1) equaçao p/ reatividade (futura): considerar bpm:
ex:;
#X text 239 274 A FAZER:;
#X msg 313 123 0;
#X floatatom 696 171 5 0 0 0 - - -;
#X obj 696 131 expr (1-(pow(2.72 \, -2.17*($f1-0.5))))/(1+(pow(2.72
\, -2.17*($f1-0.5))))+0.5, f 64;
#X obj 834 165 r \$1-sensitivity;
#X floatatom 944 166 5 0 0 0 - - -;
#X obj 763 165 average 10;
#X text 792 101 Testes com cotg;
#X text 643 325 Acima Foi feito teste com cotg e resultado obtido foi
valores ainda menores;
#X floatatom 673 284 5 0 0 0 - - -;
#X obj 673 233 expr ((pow(2.72 \, ($f1))) + (pow(2.72 \, (-$f1))))/((pow(2.72
\, ($f1)))- (pow(2.72 \, (-$f1)))), f 64;
#X text 677 208 Testes com a tgh \, porém não obtém-se o resultado
esperado \, acima de 0.44;
#X connect 0 0 6 0;
#X connect 3 0 9 0;
#X connect 4 0 10 0;
#X connect 8 0 12 0;
#X connect 8 1 11 1;
#X connect 9 0 19 0;
#X connect 10 0 13 0;
#X connect 10 1 14 0;
#X connect 12 0 11 0;
#X connect 13 0 9 0;
#X connect 13 1 9 1;
#X connect 14 0 16 0;
#X connect 14 0 13 0;
#X connect 15 0 14 0;
#X connect 19 0 0 0;
#X connect 19 0 34 0;
#X connect 19 0 41 0;
#X connect 20 0 22 0;
#X connect 20 0 21 0;
#X connect 20 0 32 0;
#X connect 21 0 14 2;
#X connect 21 0 14 3;
#X connect 22 0 14 1;
#X connect 22 0 14 4;
#X connect 23 0 10 1;
#X connect 32 0 23 0;
#X connect 34 0 33 0;
#X connect 35 0 37 1;
#X connect 41 0 40 0;
#X coords 0 -1 1 1 110 25 2 160 160;
#X restore 225 439 pd reatividade;
#N canvas 88 70 944 523 dist.tonal 0;
#X floatatom 593 449 8 0 0 0 - - -;
#X text 623 102 121 (midi 30 e 30.5 \, ~20Hz);
#X text 624 81 2700 (midi 135 e 135.1 \, ~20kHz);
#X obj 593 426 clip 121 2700;
#X floatatom 199 100 8 0 1 0 - - -;
#X text 588 102 min:;
#X text 654 451 dist_tonal;
#X text 588 81 max:;
#X obj 314 22 inlet;
#X obj 199 260 outlet;
#X text 342 291 Projeto da distancia tonal:;
#X text 367 325 Valores desejados: dist_tonal=0 quando f1=f2 (dist
tonal minima) \; e dist_tonal=1 quando |f1-f2|=4000 Hz;
#X text 104 167 dist.tonal=;
#X obj 199 22 inlet;
#X obj 430 23 inlet;
#X text 442 81 Distância Tonal por Q;
#X text 365 385 Cálculo antigo da distância tonal;
#X text 365 400 dist.tonal = (f01+f02)/abs(f01+f02);
#X text 590 397 Anteriormente (em sua primeira versão de reator) utilizava-se
um clip \, para o estimador de freq. midi;
#X floatatom 811 283 5 0 0 0 - - -;
#X obj 809 302 >= 0.01;
#X obj 795 322 spigot;
#X floatatom 199 166 5 0 0 0 - - -;
#X obj 199 126 expr (1-(pow(2.72 \, -2.17*($f1-0.5))))/(1+(pow(2.72
\, -2.17*($f1-0.5))))+0.5, f 64;
#X obj 199 75 expr (1/$f3)*2*(abs($f2-$f1)/($f2+$f1));
#X text 490 56 $f3 = dt máxima;
#X text 490 21 $f1 = f1;
#X text 490 39 $f2 = f2;
#X obj 314 44 t b f;
#X obj 430 45 t b f;
#N canvas 0 23 450 300 HISTORY 0;
#X restore 787 455 pd HISTORY;
#X obj 337 160 r \$1-sensitivity;
#X obj 266 160 average 16;
#X text 264 180 calcula um valor para cada X valores que entrar (suaviza)
Inicia com (default): X = 16, f 36;
#X floatatom 447 161 5 0 0 0 - - -;
#X floatatom 36 165 5 0 0 0 - - -;
#X text 30 183 dist. tonal;
#X text 30 196 instantanea;
#X connect 3 0 0 0;
#X connect 4 0 23 0;
#X connect 8 0 28 0;
#X connect 13 0 24 0;
#X connect 14 0 29 0;
#X connect 19 0 20 0;
#X connect 20 0 21 0;
#X connect 20 0 21 1;
#X connect 22 0 9 0;
#X connect 23 0 32 0;
#X connect 23 0 35 0;
#X connect 24 0 4 0;
#X connect 28 0 24 0;
#X connect 28 1 24 1;
#X connect 29 0 24 0;
#X connect 29 1 24 2;
#X connect 31 0 32 1;
#X connect 32 0 22 0;
#X coords 0 -1 1 1 160 25 2 100 160;
#X restore 882 266 pd dist.tonal;
#N canvas 191 133 665 326 v1' 0;
#X floatatom 146 146 6 0 0 0 - - -;
#X obj 159 116 expr (1-(($f1)/($f1+$f2)))*$f3;
#X text 215 153 calculo de v1 residual: $f1 = p1 \, $f2 = p2 e $f3
= v1;
#X obj 159 58 inlet;
#X obj 265 58 inlet;
#X obj 324 58 inlet;
#X obj 146 201 outlet;
#X text 103 146 v1' =;
#X obj 265 83 t b f;
#X obj 324 83 t b f;
#X connect 0 0 6 0;
#X connect 1 0 0 0;
#X connect 3 0 1 0;
#X connect 4 0 8 0;
#X connect 5 0 9 0;
#X connect 8 0 1 0;
#X connect 8 1 1 1;
#X connect 9 0 1 0;
#X connect 9 1 1 2;
#X coords 0 -1 1 1 100 25 2 100 140;
#X restore 388 538 pd v1';
#N canvas 133 48 711 355 v2' 0;
#X floatatom 145 105 6 0 0 0 - - -;
#X obj 98 73 expr (1-(($f2)/($f1+$f2)))*$f3;
#X text 206 107 calculo de v2 residual: $f1 = p1 \, $f2 = p2 e $f3
= v2;
#X obj 98 23 inlet;
#X obj 204 22 inlet;
#X obj 258 23 inlet;
#X obj 145 166 outlet;
#X text 103 105 v2' =;
#X obj 204 43 t b f;
#X obj 258 44 t b f;
#X connect 0 0 6 0;
#X connect 1 0 0 0;
#X connect 3 0 1 0;
#X connect 4 0 8 0;
#X connect 5 0 9 0;
#X connect 8 0 1 0;
#X connect 8 1 1 1;
#X connect 9 0 1 0;
#X connect 9 1 1 2;
#X coords 0 -1 1 1 100 25 2 100 100;
#X restore 388 567 pd v2';
#X text 62 489 Reação:;
#X text 64 338 Propriedades Som 1:;
#X text 91 514 Mixagem;
#X text 90 530 Ring Mod.;
#X text 90 546 Convolv.;
#X text 91 561 Morphing;
#X text 371 336 Propriedades Som 2:;
#X text 75 361 Volume (dB);
#X text 74 378 Reatividade;
#X obj 486 380 hsl 50 10 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 486 362 hsl 50 10 0 127 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X text 381 359 Volume (dB);
#X text 381 377 Reatividade;
#X text 384 475 Volume Novo Som:;
#X text 384 521 Volumes sons residuais:;
#X obj 364 807 *~;
#X obj 398 808 *~;
#X obj 432 807 *~;
#X text 59 698 Volume geral:;
#X obj 164 698 hsl 128 15 0.01 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 168 636 hsl 80 15 0.01 10 1 0 empty empty empty -2 -8 0 10 -262144
-1 -1 7107 1;
#X obj 168 659 hsl 80 15 0.01 10 1 0 empty empty empty -2 -8 0 10 -262144
-1 -1 7107 1;
#X obj 41 748 loadbang;
#X floatatom 302 698 5 0 0 0 - - -;
#X msg 52 773 0.01;
#X msg 460 725 0.5;
#X floatatom 460 744 7 0 0 0 - - -;
#X obj 297 134 image reactivelogo.gif;
#X text 271 133 REACTIVE;
#X text 240 160 The Musical Reactor;
#X obj 255 603 antideadlock;
#X obj 255 678 antideadlock;
#X obj 200 717 antideadlock;
#X obj 72 292 hsl 105 15 0.001 3 1 0 empty empty empty -2 -8 0 10 -228856
-1 -1 8973 1;
#X obj 197 105 loadbang;
#X msg 197 129 1;
#X obj 269 290 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 422 290 hsl 105 15 0.001 3 1 0 empty empty empty -2 -8 0 10
-228856 -1 -1 8973 1;
#X msg 230 129 1;
#X obj 318 291 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X text 185 292 vol som1;
#X text 360 290 vol som2;
#X obj 237 246 bng 15 250 50 0 empty empty empty 17 7 0 9 -258113 -1
-1;
#X text 229 231 Panic;
#X obj 499 139 bng 20 250 50 0 empty empty Play/Stop -8 -6 0 10 -203904
-1 -1;
#N canvas 938 249 196 240 onoff 0;
#X text 142 160 start;
#X msg 116 160 1;
#X msg 59 160 0;
#X text 85 160 stop;
#X obj 65 84 == 0;
#X obj 122 84 == 1;
#X obj 116 132 spigot;
#X obj 122 108 t f f;
#X obj 65 108 t f f;
#X obj 59 132 spigot;
#X floatatom 65 51 5 0 0 0 - - -;
#X obj 76 29 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
;
#X obj 30 27 inlet;
#X obj 49 197 outlet;
#X obj 101 197 outlet;
#X connect 1 0 14 0;
#X connect 2 0 13 0;
#X connect 4 0 8 0;
#X connect 5 0 7 0;
#X connect 6 0 1 0;
#X connect 7 0 6 0;
#X connect 7 1 6 1;
#X connect 8 0 9 0;
#X connect 8 1 9 1;
#X connect 9 0 2 0;
#X connect 10 0 5 0;
#X connect 10 0 4 0;
#X connect 11 0 10 0;
#X connect 12 0 10 0;
#X restore 496 62 pd onoff;
#X obj 476 61 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 285 285 reset vol, f 6;
#N canvas 115 135 1024 509 calc. 0;
#X obj 90 13 inlet;
#X obj 201 11 inlet;
#X obj 141 385 expr (abs($f2-$f1)/(($f1+$f2)/2));
#X floatatom 160 103 7 0 0 0 - - -;
#X obj 170 131 outlet;
#X text 103 102 Q max;
#X obj 72 223 expr if($f2 < $f3 \, $f2 \, $f3);
#X msg 669 193 1;
#X msg 707 193 0;
#X obj 438 43 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 188 169 f;
#X obj 237 169 f;
#X floatatom 72 249 5 0 0 0 - - -;
#X text 109 251 f mínima entre f1 e f2;
#X floatatom 347 248 5 0 0 0 - - -;
#X text 384 250 f máxima entre f1 e f2;
#X obj 347 222 expr if($f2 > $f3 \, $f2 \, $f3);
#X floatatom 117 48 5 0 0 0 - - -;
#X floatatom 167 48 5 0 0 0 - - -;
#X obj 645 220 metro 100;
#X obj 72 274 expr if($f1 < $f2 \, $f1 \, $f2);
#X floatatom 177 329 5 0 0 0 - - -;
#X text 230 331 menor f encontrado;
#X obj 254 286 loadbang;
#X floatatom 464 328 5 0 0 0 - - -;
#X obj 529 283 loadbang;
#X obj 347 271 expr if($f1 > $f2 \, $f1 \, $f2);
#X msg 529 304 50;
#X text 505 329 maior f encontrado;
#X text 211 48 f1 e f2 para testes (manual);
#X obj 317 13 inlet;
#X obj 41 174 bang;
#X text 477 60 reset;
#X obj 438 61 t b b;
#X text 355 381 cálculo de Q max (fator de qualidade) => Q = delta/M
= (abs(f2-f1))/((f1+f2)/2) = (fmax-fmin)/((fmax+fmin)/2);
#X obj 42 71 clip 20 20000;
#X obj 224 71 clip 20 20000;
#X obj 42 91 t b f;
#X obj 224 91 t b f;
#X floatatom 190 195 5 0 0 0 - - -;
#X floatatom 248 196 5 0 0 0 - - -;
#X obj 309 362 t b f;
#X msg 254 307 1000;
#X text 507 94 OBS. CALCULADOR MUITO SENSIVEL AOS VALORES;
#X text 508 107 DE ENTRADA VINDO DO CENTROIDE.;
#X text 507 139 OBS. CONSIDERAR USO DE TABELAS DE TESSITURAS;
#X text 507 152 FIXAS OU SELECIONAVEIS \, AO INVES DE FICAR;
#X text 507 166 CALCULANDO EM TEMPO REAL;
#X text 584 29 Quando trata-se de instrument virtual o patch não inicia
\, pois está conectado em pd on/off e o mesmo não está ligado ao
instrumento virtual.;
#X text 548 39 OBS.:;
#X floatatom 262 252 5 0 0 0 - - -;
#X obj 256 222 t f b b b;
#X connect 0 0 17 0;
#X connect 1 0 18 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 6 0 12 0;
#X connect 7 0 19 0;
#X connect 8 0 19 0;
#X connect 9 0 33 0;
#X connect 10 0 6 1;
#X connect 10 0 16 1;
#X connect 10 0 39 0;
#X connect 11 0 6 2;
#X connect 11 0 16 2;
#X connect 11 0 40 0;
#X connect 12 0 20 0;
#X connect 14 0 26 0;
#X connect 16 0 14 0;
#X connect 17 0 35 0;
#X connect 18 0 36 0;
#X connect 20 0 21 0;
#X connect 21 0 2 0;
#X connect 21 0 51 0;
#X connect 23 0 42 0;
#X connect 24 0 26 1;
#X connect 24 0 41 0;
#X connect 25 0 27 0;
#X connect 26 0 24 0;
#X connect 27 0 24 0;
#X connect 30 0 9 0;
#X connect 31 0 6 0;
#X connect 31 0 16 0;
#X connect 33 0 42 0;
#X connect 33 1 27 0;
#X connect 35 0 37 0;
#X connect 36 0 38 0;
#X connect 37 0 31 0;
#X connect 37 1 10 0;
#X connect 38 0 31 0;
#X connect 38 1 11 0;
#X connect 41 0 2 0;
#X connect 41 1 2 1;
#X connect 42 0 51 0;
#X connect 50 0 20 1;
#X connect 51 0 50 0;
#X coords 0 -1 1 1 110 20 2 100 100;
#X restore 879 160 pd calc. Q;
#X text 996 155 Qmax = cálculo do fator de qualidade p/ máxima extensão
de f1 e f2, f 36;
#X text 1046 271 dt12 (distância tonal entre som1 e som2);
#X text 341 435 <-- r12 (calculo da reatividade entre som1 e som2)
, f 35;
#N canvas 29 233 575 401 player_som1 0;
#X obj 108 86 openpanel;
#X msg 101 155 open \$1;
#X obj 100 183 readsf~;
#X msg 228 145 0;
#X msg 186 145 1;
#X obj 297 179 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X symbolatom 137 113 20 0 0 0 - - -;
#X obj 187 84 t b b;
#X obj 101 133 symbol;
#X obj 109 27 inlet;
#X obj 161 27 inlet;
#X obj 215 27 inlet;
#X obj 100 297 outlet~;
#X obj 269 27 inlet;
#X obj 100 216 *~;
#X obj 154 216 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 297 159 metro 100;
#X text 176 45 play;
#X text 227 45 stop;
#X obj 234 84 t b b;
#X msg 297 138 0;
#X obj 154 298 outlet;
#X text 178 314 bang quando stop OU end of play;
#X obj 173 273 tabwrite~ Som_1;
#X connect 0 0 6 0;
#X connect 0 0 8 1;
#X connect 1 0 2 0;
#X connect 2 0 14 0;
#X connect 2 1 15 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 23 0;
#X connect 7 0 4 0;
#X connect 7 0 16 0;
#X connect 7 1 8 0;
#X connect 8 0 1 0;
#X connect 9 0 0 0;
#X connect 10 0 7 0;
#X connect 11 0 19 0;
#X connect 13 0 14 1;
#X connect 14 0 12 0;
#X connect 14 0 23 0;
#X connect 15 0 21 0;
#X connect 16 0 5 0;
#X connect 19 0 20 0;
#X connect 19 0 15 0;
#X connect 19 1 3 0;
#X connect 20 0 16 0;
#X restore 210 318 pd player_som1;
#N canvas 29 233 575 401 player_som2 0;
#X obj 108 86 openpanel;
#X msg 101 155 open \$1;
#X obj 100 183 readsf~;
#X msg 228 145 0;
#X msg 186 145 1;
#X obj 297 179 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X symbolatom 137 113 20 0 0 0 - - -;
#X obj 187 84 t b b;
#X obj 101 133 symbol;
#X obj 109 27 inlet;
#X obj 161 27 inlet;
#X obj 215 27 inlet;
#X obj 100 297 outlet~;
#X obj 173 273 tabwrite~ Som_2;
#X obj 269 27 inlet;
#X obj 100 216 *~;
#X obj 154 216 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 297 159 metro 100;
#X text 176 45 play;
#X text 227 45 stop;
#X obj 234 84 t b b;
#X msg 297 138 0;
#X obj 154 298 outlet;
#X text 178 314 bang quando stop OU end of play;
#X connect 0 0 6 0;
#X connect 0 0 8 1;
#X connect 1 0 2 0;
#X connect 2 0 15 0;
#X connect 2 1 16 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 13 0;
#X connect 7 0 4 0;
#X connect 7 0 17 0;
#X connect 7 1 8 0;
#X connect 8 0 1 0;
#X connect 9 0 0 0;
#X connect 10 0 7 0;
#X connect 11 0 20 0;
#X connect 14 0 15 1;
#X connect 15 0 13 0;
#X connect 15 0 12 0;
#X connect 16 0 22 0;
#X connect 17 0 5 0;
#X connect 20 0 21 0;
#X connect 20 0 16 0;
#X connect 20 1 3 0;
#X connect 21 0 17 0;
#X restore 331 318 pd player_som2;
#N canvas 18 48 1280 685 descpt 0;
#X obj 154 139 tgl 15 0 empty empty on/off 17 7 0 10 -262144 -1 -1
1 1;
#X obj 116 79 centroid~ 2048 4;
#X msg 218 59 set 1024 2;
#X obj 336 140 tgl 15 0 empty empty on/off 17 7 0 10 -262144 -1 -1
1 1;
#X obj 296 79 centroid~ 2048 4;
#X msg 398 59 set 1024 2;
#X floatatom 116 139 5 0 0 0 - - -;
#X floatatom 296 139 5 0 0 0 - - -;
#X obj 116 34 inlet~;
#X obj 296 34 inlet~;
#X obj 116 210 outlet;
#X obj 296 210 outlet;
#X text 114 9 Entrada do Som 1;
#X text 294 9 Entrada do Som 2;
#X text 101 107 Centróide Espectral;
#X text 275 107 Centróide Espectral;
#X text 107 123 Som 1;
#X text 287 123 Som 2;
#X obj 492 11 loadbang;
#X text 280 357 OBS. GABRIEL: o on/off de controle do centroide está
com comportamento esquisito: quando liga/desliga/liga pela segunda
vez os valores sao diferentes: descobrir o que está ocorrendo. Comportamento
esperado é: ligou \, se o som nao mudar ele deve dar um mesmo valor
único de centroide espectral.;
#X obj 405 30 loadbang;
#X obj 216 32 loadbang;
#X obj 596 111 r \$1-sensitivity;
#X obj 458 153 average 16;
#X obj 539 154 average 16;
#X text 455 178 calcula um valor de centroide para cada X valores que
entrar (suaviza) Inícia com (default): X = 16, f 36;
#X floatatom 617 137 5 0 0 0 - - -;
#X connect 0 0 1 1;
#X connect 1 0 23 0;
#X connect 2 0 1 1;
#X connect 3 0 4 1;
#X connect 4 0 24 0;
#X connect 5 0 4 1;
#X connect 6 0 10 0;
#X connect 7 0 11 0;
#X connect 8 0 1 0;
#X connect 9 0 4 0;
#X connect 18 0 0 0;
#X connect 18 0 3 0;
#X connect 20 0 5 0;
#X connect 21 0 2 0;
#X connect 22 0 23 1;
#X connect 22 0 24 1;
#X connect 22 0 26 0;
#X connect 23 0 6 0;
#X connect 24 0 7 0;
#X coords 0 -1 1 1 300 70 2 100 100;
#X restore 664 78 pd descpt;
#X text 663 59 Estimador de frequencia usando o centróide espectral
;
#X text 73 660 Som 2;
#N canvas 332 87 776 676 reat_individual 0;
#X obj 426 55 inlet;
#X obj 570 55 inlet;
#X obj 51 61 inlet;
#X text 41 20 Reatividade;
#X text 42 36 Entre 1 e 2;
#X obj 49 276 expr if ($f1 < $f2 \, $f1 \, $f2);
#X obj 181 55 inlet;
#X obj 298 55 inlet;
#X obj 176 155 expr $f1/$f2;
#X obj 409 272 expr if ($f1 < $f2 \, $f1 \, $f2);
#X text 233 274 <- qtd. min. i;
#X text 594 273 <- qtd. min. j;
#X obj 428 152 expr $f1/$f2;
#X obj 80 374 expr ($f1 - ($f2*$f3));
#X obj 408 376 expr ($f1 - ($f2*$f3));
#X text 261 154 qm 1 individual;
#X text 511 151 qm 2 individual;
#X obj 225 523 outlet;
#X obj 315 523 outlet;
#X floatatom 297 421 5 0 0 0 - - -;
#X floatatom 297 441 5 0 0 0 - - -;
#X text 251 402 Volumes Residuais;
#X text 433 35 r1;
#X text 577 35 r2;
#X text 264 418 q1';
#X text 265 442 q2';
#X text 408 398 q2' = q2- (qm2 * r2);
#X text 92 398 q1' = q1- (qm1 * r1);
#X text 56 375 q1';
#X text 377 374 q2';
#X text 414 291 qm = r12 * min(q1/r1 \, q2/r2);
#X text 70 297 qm = r12 * min(q1/r1 \, q2/r2);
#X text 269 168 qm 1 = q1/r1;
#X text 513 163 qm 2 = q2/r2;
#X text 187 35 q1;
#X text 304 35 q2;
#X text 268 522 q1';
#X text 367 522 q2';
#X connect 0 0 8 1;
#X connect 0 0 13 2;
#X connect 1 0 12 1;
#X connect 1 0 14 2;
#X connect 2 0 5 0;
#X connect 2 0 9 0;
#X connect 5 0 13 1;
#X connect 6 0 8 0;
#X connect 6 0 13 0;
#X connect 7 0 12 0;
#X connect 7 0 14 0;
#X connect 8 0 5 1;
#X connect 9 0 14 1;
#X connect 12 0 9 1;
#X connect 13 0 19 0;
#X connect 14 0 20 0;
#X connect 19 0 17 0;
#X connect 20 0 18 0;
#X coords 0 0 1 1 110 60 2 250 400;
#X restore 1001 454 pd reat_individual;
#X obj 1057 224 loadbang;
#X obj 1038 244 f 2;
#X obj 1038 224 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#N canvas 113 47 450 300 mix 0;
#X obj 14 40 inlet~;
#X obj 61 41 inlet;
#X obj 48 92 line~;
#X obj 34 125 *~;
#X obj 48 69 pack 0 10;
#X obj 183 42 inlet~;
#X obj 230 43 inlet;
#X obj 213 89 line~;
#X obj 195 127 *~;
#X obj 213 68 pack 0 10;
#X obj 105 206 +~;
#X obj 105 234 outlet~;
#X obj 127 125 hsl 50 8 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 127 137 hsl 50 8 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 0 1;
#X obj 157 77 line;
#X obj 119 77 line;
#X text 105 121 s1;
#X text 105 133 s2;
#X text 119 106 a;
#X text 105 100 S1;
#X text 127 100 S2;
#X text 141 106 b;
#X connect 0 0 3 1;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
#X connect 3 0 10 0;
#X connect 4 0 2 0;
#X connect 4 0 15 0;
#X connect 5 0 8 1;
#X connect 6 0 9 0;
#X connect 7 0 8 0;
#X connect 8 0 10 1;
#X connect 9 0 7 0;
#X connect 9 0 14 0;
#X connect 10 0 11 0;
#X connect 14 0 13 0;
#X connect 15 0 12 0;
#X coords 0 -1 1 1 85 50 2 100 100;
#X restore 562 630 pd mix;
#X obj 261 636 bng 14 250 50 0 empty empty Reset 17 11 0 6 -262144
-1 -1;
#N canvas 20 229 450 300 sensitivity 0;
#X floatatom 103 103 3 0 64 0 - - -;
#X obj 130 103 hsl 50 15 0 64 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 3675 1;
#X obj 130 130 antideadlock;
#X obj 245 141 faixa;
#X msg 263 115 0;
#X obj 103 213 round;
#X obj 327 88 loadbang;
#X text 30 55 OBS Este box e slider estão com valores máximos de
0 a 64;
#X obj 103 242 s \$1-sensitivity;
#X msg 358 115 0;
#X floatatom 63 241 5 0 0 0 - - -;
#X msg 293 115 64;
#X msg 327 115 64;
#X obj 108 162 expr 64-$f1;
#X msg 156 76 48;
#X connect 0 0 2 0;
#X connect 0 0 13 0;
#X connect 1 0 2 1;
#X connect 2 0 0 0;
#X connect 2 1 1 0;
#X connect 4 0 3 1;
#X connect 5 0 8 0;
#X connect 5 0 10 0;
#X connect 6 0 4 0;
#X connect 6 0 11 0;
#X connect 6 0 12 0;
#X connect 6 0 9 0;
#X connect 6 0 14 0;
#X connect 9 0 3 4;
#X connect 11 0 3 2;
#X connect 12 0 3 3;
#X connect 13 0 5 0;
#X connect 14 0 0 0;
#X coords 0 -1 1 1 85 20 2 100 100;
#X restore 232 207 pd sensitivity;
#X text 230 190 Sensitivity;
#X msg 41 593 5;
#X obj 364 649 / 10;
#X obj 365 620 / 10;
#N canvas 18 76 1099 601 v3 0;
#X obj 24 36 inlet;
#X obj 140 36 inlet;
#X obj 210 35 inlet;
#X obj 127 304 expr $f1*$f2;
#X obj 199 157 minimum;
#X obj 282 36 inlet;
#X obj 350 35 inlet;
#X floatatom 191 376 5 0 0 0 - - -;
#X obj 99 404 outlet;
#X obj 259 125 t b f;
#X text 24 15 r12;
#X text 281 16 r1;
#X text 349 16 r2;
#X obj 190 64 t b f;
#X obj 283 62 t b f;
#X obj 149 282 t b f;
#X floatatom 199 179 5 0 0 0 - - -;
#X obj 149 260 average 12;
#X obj 166 325 clip 0 90;
#X floatatom 127 325 5 0 0 0 - - -;
#X floatatom 195 104 5 0 0 0 - - -;
#X floatatom 288 105 5 0 0 0 - - -;
#X floatatom 50 59 5 0 0 0 - - -;
#X obj 539 144 expr if($f2 < $f3 \, $f2 \, $f3);
#X obj 640 94 f;
#X obj 884 95 f;
#X floatatom 539 166 5 0 0 0 - - -;
#X floatatom 814 169 5 0 0 0 - - -;
#X obj 814 143 expr if($f2 > $f3 \, $f2 \, $f3);
#X obj 539 191 expr if($f1 < $f2 \, $f1 \, $f2);
#X floatatom 540 214 5 0 0 0 - - -;
#X floatatom 814 216 5 0 0 0 - - -;
#X obj 814 192 expr if($f1 > $f2 \, $f1 \, $f2);
#X obj 586 90 bang;
#X obj 606 59 t b f;
#X obj 884 59 t b f;
#X floatatom 646 117 5 0 0 0 - - -;
#X floatatom 896 119 5 0 0 0 - - -;
#X obj 540 243 t b f;
#X text 576 168 v mínima entre v1 e v2;
#X text 851 171 v máxima entre v1 e v2;
#X obj 169 84 expr $f1/$f2;
#X obj 259 84 expr $f1/$f2;
#X text 583 220 menor qm encontrado;
#X text 855 218 maior qm encontrado;
#X text 92 453 OBSERVAÇÕES: 1) Existem dois calculadores de v3: um
que utiliza o patch "minimum" e outro que utiliza uma lógica com if.
Selecione o desejado.;
#N canvas 512 184 560 307 seletor 0;
#X obj 87 120 == 0;
#X obj 144 120 == 1;
#X floatatom 113 97 5 0 0 0 - - -;
#X obj 140 78 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 129 10 inlet;
#X obj 40 217 outlet;
#X obj 142 34 hradio 12 1 0 2 empty empty empty 0 -8 0 10 -228856 -1
-1 0;
#X obj 40 168 spigot;
#X obj 127 168 spigot;
#X obj 40 10 inlet;
#X floatatom 160 142 5 0 0 0 - - -;
#X floatatom 73 141 5 0 0 0 - - -;
#X obj 84 10 inlet;
#X text 167 32 sel.2->1;
#X connect 0 0 11 0;
#X connect 1 0 10 0;
#X connect 2 0 1 0;
#X connect 2 0 0 0;
#X connect 3 0 2 0;
#X connect 4 0 6 0;
#X connect 6 0 2 0;
#X connect 7 0 5 0;
#X connect 8 0 5 0;
#X connect 9 0 7 0;
#X connect 10 0 8 1;
#X connect 11 0 7 1;
#X connect 12 0 8 0;
#X coords 0 -1 1 1 80 20 2 140 30;
#X restore 331 224 pd seletor;
#X obj 198 357 hradio 12 1 0 2 empty empty empty 0 -8 0 10 -228856
-1 -1 0;
#X text 543 31 Cálculo de qtd de matéria usando if do qmax;
#X text 103 354 Select method:;
#X text 81 226 Seletor de método de cálculo de mínimo:;
#X text 208 303 <-- q3 = r12 * minimo (v1/r1 \, v2/r2);
#X text 104 376 qm:;
#X text 236 378 Quantidade de produto final qm clipado entre 0 e 90
;
#X text 133 103 q1/r1 ->;
#X text 327 104 <- q2/r2;
#X text 255 157 <-- minimo (q1/r1 \, q2/r2);
#X text 139 16 q1;
#X text 210 15 q2;
#X connect 0 0 3 0;
#X connect 0 0 22 0;
#X connect 1 0 41 0;
#X connect 2 0 42 0;
#X connect 3 0 18 0;
#X connect 3 0 19 0;
#X connect 4 0 16 0;
#X connect 5 0 13 0;
#X connect 6 0 14 0;
#X connect 7 0 8 0;
#X connect 9 0 4 0;
#X connect 9 1 4 1;
#X connect 13 0 41 0;
#X connect 13 1 41 1;
#X connect 14 0 42 0;
#X connect 14 1 42 1;
#X connect 15 0 3 0;
#X connect 15 1 3 1;
#X connect 16 0 46 0;
#X connect 17 0 15 0;
#X connect 18 0 7 0;
#X connect 20 0 34 0;
#X connect 21 0 35 0;
#X connect 23 0 26 0;
#X connect 24 0 23 1;
#X connect 24 0 28 1;
#X connect 24 0 36 0;
#X connect 25 0 23 2;
#X connect 25 0 28 2;
#X connect 25 0 37 0;
#X connect 26 0 29 0;
#X connect 27 0 32 0;