-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharray.binop-help.pd
executable file
·79 lines (79 loc) · 2.93 KB
/
array.binop-help.pd
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
#N canvas 372 23 821 954 12;
#N canvas 0 22 450 278 (subpatch) 0;
#X array \$0-arrayA 10 float 3;
#A 0 0.9 0.8 0 0.3 1.3 0.1 0.7 0.4 1.5 1;
#X coords 0 1 10 -1 200 140 1 0 0;
#X restore 57 353 graph;
#N canvas 0 22 450 278 (subpatch) 0;
#X array \$0-arrayB 10 float 3;
#A 0 -1 -1 1 1 1 0 0 0 1 1;
#X coords 0 1 10 -1 200 140 1 0 0;
#X restore 54 531 graph;
#N canvas 0 22 450 278 (subpatch) 0;
#X array \$0-arrayC 10 float 2;
#X coords 0 1 10 -1 200 140 1 0 0;
#X restore 55 767 graph;
#X obj 324 498 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 323 452 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 324 579 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 324 629 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 323 675 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 323 474 array.rand \$0-arrayA 0 2 0.1;
#X obj 323 715 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 323 733 array.binop \$0-arrayA \$0-arrayB \$0-arrayC ||;
#X obj 324 520 array.rand \$0-arrayB -1 1 1;
#X obj 323 755 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 323 773 array.binop \$0-arrayA \$0-arrayB \$0-arrayC cos;
#X obj 324 600 array.binop \$0-arrayA \$0-arrayB \$0-arrayC *;
#X obj 323 650 array.binop \$0-arrayA \$0-arrayB \$0-arrayC +;
#X obj 323 693 array.binop \$0-arrayA \$0-arrayB \$0-arrayC &&;
#X obj 1 27 cnv 3 800 3 empty empty description 12 12 0 12 -128992
-66577 0;
#X obj 1 131 cnv 3 800 3 empty empty inlets 8 12 0 13 -228856 -1 0
;
#X obj 87 139 cnv 18 3 17 empty empty 0 5 9 0 14 -228856 -162280 0
;
#X obj 1 171 cnv 3 800 3 empty empty outlets 8 12 0 13 -228856 -1 0
;
#X obj 87 179 cnv 18 3 17 empty empty 0 5 9 0 14 -228856 -162280 0
;
#X obj 1 291 cnv 3 800 3 empty empty example 8 12 0 13 -228856 -1 0
;
#X obj 1 -1 cnv 3 800 3 empty empty array.binop 14 14 1 16 -128992
-66577 0;
#X text 107 139 bang;
#X obj 1 205 cnv 3 800 3 empty empty arguments 8 12 0 13 -228856 -1
0;
#X obj 621 40 plnf_version;
#X text 32 48 Having an arrayA and an arrayB \, uses an arbitrary object
or abstraction (with two numerical inputs) to perform the desired operation
in the input values (one by one) and stores the result in arrayC;
#X text 321 433 1 generate random values to test;
#X text 322 556 2 perform different operations;
#X obj 323 815 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 323 833 array.binop \$0-arrayA \$0-arrayB \$0-arrayC expr ($f1-$f2)/($f1+$f2)
;
#X text 348 812 you can also use expr or any arbitrary abstraction!
;
#X text 109 179 iterated output values (the same stored in arrayC)
;
#X text 87 213 \$1 array 1 (input data);
#X text 87 231 \$2 array 2 (input data);
#X text 87 248 \$3 array 3 (output data);
#X text 87 264 \$4 ... operation ex. "expr abs($f1-$f2)";
#X connect 3 0 11 0;
#X connect 4 0 8 0;
#X connect 5 0 14 0;
#X connect 6 0 15 0;
#X connect 7 0 16 0;
#X connect 9 0 10 0;
#X connect 12 0 13 0;
#X connect 30 0 31 0;