#N canvas 544 23 565 695 10;
#X declare -stdpath ./;
#X obj 4 663 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X obj 4 270 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 485 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 6 549 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 90 463 cnv 1 3 17 empty empty 0=>n 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 168 465 signal;
#X text 140 496 signal;
#X text 152 517 list;
#X obj 90 277 cnv 17 3 180 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 126 556 1) float;
#X text 126 571 2) float;
#X text 126 586 3) float;
#X obj 91 515 cnv 1 3 28 empty empty n+1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 218 465 - signals to route and mix, f 53;
#X text 190 495 - routed/mixed signals from inlets;
#X obj 91 494 cnv 1 3 17 empty empty 0=>n 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 6 615 cnv 3 550 3 empty empty attributes 8 12 0 13 #dcdcdc #000000 0;
#X text 50 86 [matrix~] routs signals from any inlets to one or more outlets. If more than one inlet connects to an outlet \, the output is the sum of the inlets' signals., f 64;
#X text 190 556 - 'n' number of inputs (1 to 250 \, default 1), f 52;
#X text 190 571 - 'n' number of outputs (1 to 499 \, default 1), f 52;
#N canvas 616 136 498 299 example 0;
#X obj 366 206 print dump;
#X msg 163 82 dump;
#X text 86 104 0;
#X text 101 104 1;
#X text 116 104 2;
#X text 131 105 3;
#N canvas 0 23 892 491 matrix-logic 0;
#X obj 496 410 outlet;
#X obj 112 48 inlet;
#X obj 496 375 t b a;
#X msg 353 272 0 0 \$1;
#X msg 401 272 1 0 \$1;
#X msg 450 273 2 0 \$1;
#X msg 504 274 3 0 \$1;
#X msg 560 276 0 1 \$1;
#X msg 612 277 1 1 \$1;
#X msg 664 279 2 1 \$1;
#X msg 720 280 3 1 \$1;
#X obj 496 348 cyclone/prepend set;
#X obj 122 196 s \$0-r00;
#X obj 108 232 s \$0-r10;
#X obj 91 257 s \$0-r20;
#X obj 81 280 s \$0-r30;
#X obj 234 175 s \$0-r01;
#X obj 223 198 s \$0-r11;
#X obj 220 227 s \$0-r21;
#X obj 211 252 s \$0-r31;
#X obj 495 147 r \$0-s00;
#X obj 497 173 r \$0-s10;
#X obj 511 196 r \$0-s20;
#X obj 513 222 r \$0-s30;
#X obj 702 162 r \$0-s01;
#X obj 704 188 r \$0-s11;
#X obj 718 211 r \$0-s21;
#X obj 720 237 r \$0-s31;
#X obj 300 100 tgl 15 0 \$0-s00 \$0-r00 empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 315 100 tgl 15 0 \$0-s10 \$0-r10 empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 330 100 tgl 15 0 \$0-s20 \$0-r20 empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 345 100 tgl 15 0 \$0-s30 \$0-r30 empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 300 115 tgl 15 0 \$0-s01 \$0-r01 empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 315 115 tgl 15 0 \$0-s11 \$0-r11 empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 330 115 tgl 15 0 \$0-s21 \$0-r21 empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 345 115 tgl 15 0 \$0-s31 \$0-r31 empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X msg 562 385 0 0 1;
#X connect 1 0 12 0;
#X connect 1 0 13 0;
#X connect 1 0 14 0;
#X connect 1 0 15 0;
#X connect 1 0 16 0;
#X connect 1 0 17 0;
#X connect 1 0 18 0;
#X connect 1 0 19 0;
#X connect 2 0 0 0;
#X connect 2 1 0 0;
#X connect 3 0 11 0;
#X connect 4 0 11 0;
#X connect 5 0 11 0;
#X connect 6 0 11 0;
#X connect 7 0 11 0;
#X connect 8 0 11 0;
#X connect 9 0 11 0;
#X connect 10 0 11 0;
#X connect 11 0 2 0;
#X connect 11 0 36 0;
#X connect 20 0 3 0;
#X connect 21 0 4 0;
#X connect 22 0 5 0;
#X connect 23 0 6 0;
#X connect 24 0 7 0;
#X connect 25 0 8 0;
#X connect 26 0 9 0;
#X connect 27 0 10 0;
#X coords 0 -1 1 1 60 30 2 300 100;
#X restore 82 120 pd matrix-logic;
#X msg 123 26 clear;
#X obj 184 138 osc~ 300;
#X obj 240 138 osc~ 400;
#X obj 303 138 osc~ 500;
#X obj 366 138 osc~ 600;
#X msg 82 83 set 0;
#X text 166 202 0;
#X text 277 203 1;
#X text 161 166 0;
#X text 225 166 1;
#X text 290 166 2;
#X text 353 167 3;
#X msg 82 157 0 0 1;
#X text 26 120 output 0;
#X text 26 135 output 1;
#X text 44 104 input:;
#X msg 147 57 ramp 100;
#X msg 177 107 print;
#X text 246 67 basic binary mode operation;
#X obj 177 182 cyclone/matrix~ 4 2, f 32;
#X obj 172 223 output~;
#X obj 328 256 declare -stdpath ./;
#X connect 1 0 26 0;
#X connect 6 0 19 0;
#X connect 7 0 12 0;
#X connect 7 0 26 0;
#X connect 8 0 26 0;
#X connect 9 0 26 1;
#X connect 10 0 26 2;
#X connect 11 0 26 3;
#X connect 12 0 6 0;
#X connect 19 0 26 0;
#X connect 23 0 26 0;
#X connect 24 0 26 0;
#X connect 26 0 27 0;
#X connect 26 1 27 1;
#X connect 26 2 0 0;
#X restore 479 165 pd example;
#X obj 246 183 cyclone/matrix~ 2 2, f 25;
#X obj 262 154 sig~ 1;
#X obj 393 154 sig~ 2;
#X obj 488 71 ./dsponoff~;
#X obj 246 126 r \$0-matrix;
#X text 106 621 @ramp <float> -;
#X text 190 586 -;
#X text 208 586 sets to "non-binary" mode and the gain value for connections. If not provided \, "binary" mode is on;
#X obj 46 233 s \$0-matrix;
#X obj 46 145 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X msg 46 165 0 0 \$1;
#X obj 58 188 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X msg 58 208 0 1 \$1;
#X obj 143 233 s \$0-matrix;
#X obj 143 145 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 155 188 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X msg 143 165 1 0 \$1;
#X msg 155 208 1 1 \$1;
#X text 230 280 in binary mode: <inlet# \, outlet# \, on/off>. In non binary mode: <inlet# \, outlet# \, gain \, ramp>, f 51;
#X text 190 517 -;
#X text 202 517 on <dump> messages \, rightmost outlet dumps a list with all connections: <inlet# \, outlet# \, gain>, f 49;
#X text 180 281 list;
#X text 218 281 -;
#X text 174 361 clear;
#X text 180 394 dump;
#X text 132 378 ramp <float>;
#X text 120 306 connect <list>;
#X text 102 333 disconnect <list>;
#X text 218 377 - sets ramp (fade) time - only in non-binary mode, f 53;
#X text 218 360 - removes all connections, f 53;
#X text 144 436 dumptarget;
#X text 174 421 print;
#X text 218 420 -;
#X text 218 394 -;
#X text 230 393 outputs current state of all connections in the rightmost outlet a list: <inlet# \, outlet# \, gain>, f 51;
#X text 218 435 -;
#X text 218 305 -;
#X text 230 306 connects any inlet specified by the 1st value to outlet(s) specified by remaining value(s), f 51;
#X text 218 332 -;
#X text 230 333 disconnects any inlet specified by the 1st value to outlet(s) specified by the remaining value(s);
#X text 230 420 same as dump \, but prints on the terminal window, f 51;
#N canvas 486 150 821 487 binary/non-binary 0;
#X obj 515 98 osc~ 300;
#X obj 574 98 osc~ 400;
#X obj 633 98 osc~ 500;
#X obj 692 99 osc~ 600;
#X floatatom 438 45 5 0 0 0 - - - 0;
#X floatatom 460 273 5 0 0 0 - - - 0;
#X obj 502 322 osc~ 300;
#X obj 565 322 osc~ 400;
#X obj 628 322 osc~ 500;
#X obj 691 322 osc~ 600;
#X obj 438 20 hradio 15 1 0 4 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0;
#X obj 460 252 hradio 15 1 0 4 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0;
#X text 21 100 "binary" mode (default):;
#X obj 515 131 cyclone/matrix~ 4 2, f 30;
#X obj 74 37 cnv 15 220 30 empty empty empty 20 12 0 14 #e0e0e0 #404040 0;
#X text 40 227 - "non-binary" mode is set when there is a third argument (that also specifies the default gain for all connections)., f 62;
#X obj 502 356 cyclone/matrix~ 4 1 1 @ramp 1000;
#X text 509 13 In binary mode \, only 0/1 gain values (clicks occur), f 30;
#X obj 692 167 print dump;
#X obj 691 384 print dumptarget;
#X msg 438 68 clear \, connect \$1 0 1 \, dump \, print;
#X msg 460 293 clear \, \$1 0 0.5 \, dumptarget;
#X text 530 246 In non-binary mode \, you can set gain values and ramp time (optional), f 36;
#X text 40 124 - In "binary" mode \, connections are either on or off. This can cause audible clicks when routing., f 62;
#X text 23 201 "non-binary" mode (requires more CPU time):;
#X text 40 257 - In this mode \, connections formed with the <connect> message always have the gain specified by the third argument. However \, list messages can alter the gain of connections formed with the <connect> message. So \, if you want to specify the gain of each connection in "non-binary" mode \, you must use list messages (see below)., f 62;
#X text 40 330 - A list message allows an arbitrary gain value set by the 3rd float. This mode also allows a 4th optional list item that sets the ramp time (for fade in/out or crossfading)., f 62;
#X text 40 156 - The 'dump' and 'dumptarget' are the same in this mode. The 'print' message is also the same but prints on the terminal isntead., f 62;
#X text 40 371 - The dump message in non-binary mode gives you the current gain state. The 'print' message is the same but prints on the terminal isntead. The 'dumptarget' message gives you the target gain and may not be the same as the current state because of the ramp time., f 62;
#X obj 515 165 output~;
#X obj 502 393 output~;
#X text 96 46 binary/non binary;
#X connect 0 0 13 0;
#X connect 1 0 13 1;
#X connect 2 0 13 2;
#X connect 3 0 13 3;
#X connect 4 0 20 0;
#X connect 5 0 21 0;
#X connect 6 0 16 0;
#X connect 7 0 16 1;
#X connect 8 0 16 2;
#X connect 9 0 16 3;
#X connect 10 0 4 0;
#X connect 11 0 5 0;
#X connect 13 0 29 0;
#X connect 13 1 29 1;
#X connect 13 2 18 0;
#X connect 16 0 30 0;
#X connect 16 1 19 0;
#X connect 20 0 13 0;
#X connect 21 0 16 0;
#X restore 419 188 pd binary/non-binary;
#X text 230 436 outputs target state of all connections in the rightmost outlet a list: <inlet# \, outlet# \, gain>, f 51;
#X text 204 622 only in non-binary mode (that is \, if all 3 arguments are given \, you can include a ramp value as an attribute) - default is 10 ms, f 43;
#X obj 2 3 ./header matrix~;
#X text 22 61 Signal routing/mixing matrix;
#X obj 246 215 cyclone/snapshot~ 1;
#X floatatom 246 241 6 0 0 0 - - - 0;
#X obj 384 216 cyclone/snapshot~ 1;
#X floatatom 384 237 6 0 0 0 - - - 0;
#X connect 21 0 67 0;
#X connect 21 1 69 0;
#X connect 22 0 21 0;
#X connect 23 0 21 1;
#X connect 25 0 21 0;
#X connect 30 0 31 0;
#X connect 31 0 29 0;
#X connect 32 0 33 0;
#X connect 33 0 29 0;
#X connect 35 0 37 0;
#X connect 36 0 38 0;
#X connect 37 0 34 0;
#X connect 38 0 34 0;
#X connect 67 0 68 0;
#X connect 69 0 70 0;
