1
#N canvas 0 0 956 304 10;
2
#X obj 368 207 maskxor;
5
#X floatatom 390 247 5 0 0 0 - - -;
6
#X floatatom 368 264 5 0 0 0 - - -;
7
#X floatatom 254 122 5 0 0 0 - - -;
9
#X msg 457 80 listl 1 1 0 0 0 1 1;
10
#X msg 500 97 listr 0 1 1 0 2 1 0;
11
#X text 39 56 Maskxor takes two lists - listr and listl \, to set up
12
a map where map = listl ^ listr.;
13
#X text 37 93 Floats will only pass through if map[(int)float] > 0
14
\, so if the corresponding element is greater than zero in either listl
15
\, or listr \, but not both.;
16
#X text 76 148 outputs the map \, the xor-ed element and (if this is
17
greater than zero) the last float in.;
18
#X obj 412 227 print MASK;
19
#X text 41 22 Maskxor - exclusive-OR mask map by Edward Kelly. This
22
#X text 79 192 resets the object;
23
#X text 29 283 Polyphony control objects by Ed Kelly November 2006
25
#X text 397 282 See also;
27
#X obj 501 280 polymap;
28
#X obj 558 280 polystat;
29
#N canvas 0 0 450 300 (subpatch) 0;
30
#X msg 174 179 0 1 0 0 1 1 2;
31
#X obj 150 84 loadbang;
32
#X obj 175 217 outlet;
35
#X restore 584 152 pd;
38
#X obj 568 190 prepend listr;
39
#X obj 473 190 prepend listl;
40
#X msg 662 97 1 0 0 1 1;
41
#X msg 678 114 1 1 0 0 0 1;
42
#X msg 721 131 0 1 1 0 2 1 0;
43
#X msg 669 190 mode \$1;
44
#X obj 669 167 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
46
#X text 728 191 ... in mode 1 \, floats are only;
47
#X text 729 204 passed through the left outlet;
48
#X text 728 217 when the left list contains;
49
#X text 727 229 fewer non-zero elements than;
50
#X text 727 241 the right list. CHANGED BEHAVIOUR!;
51
#X msg 651 65 1 0 0 1 0 0 0 1;
52
#X msg 638 49 1 0 0 1 0 1 0 1;
100
#X connect 28 0 23 0;
102
#X connect 30 0 29 0;
103
#X connect 36 0 23 0;
104
#X connect 37 0 23 0;