#N canvas 429 23 567 723 10;
#X declare -stdpath ./;
#X obj 4 696 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X obj 4 311 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 2 526 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 6 587 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 90 504 cnv 1 3 17 empty empty 0=>n 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 168 506 signal;
#X text 140 536 signal;
#X text 152 557 list;
#X obj 90 318 cnv 17 3 180 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 126 593 1) float;
#X text 126 608 2) float;
#X text 126 622 3) float;
#X obj 91 555 cnv 1 3 28 empty empty n+1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X text 218 506 - signals to route and mix, f 53;
#X text 190 535 - routed/mixed signals from inlets;
#X obj 91 534 cnv 1 3 17 empty empty 0=>n 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 6 651 cnv 3 550 3 empty empty attributes 8 12 0 13 #dcdcdc #000000 0;
#X text 190 593 - 'n' number of inputs (1 to 250 \, default 1), f 52;
#X text 190 608 - '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 480 200 pd example;
#X obj 245 179 cyclone/matrix~ 2 2;
#X obj 245 128 sig~ 1;
#X obj 356 128 sig~ 2;
#X obj 488 71 ./dsponoff~;
#X obj 264 153 r \$0-matrix;
#X text 106 657 @ramp <float> -;
#X text 190 622 -;
#X text 208 622 sets to "non-binary" mode and the gain value for connections. If not provided \, "binary" mode is on;
#X obj 41 227 s \$0-matrix;
#X obj 41 139 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X msg 41 159 0 0 \$1;
#X obj 53 182 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X msg 53 202 0 1 \$1;
#X obj 138 227 s \$0-matrix;
#X obj 138 139 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 150 182 tgl 15 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X msg 138 159 1 0 \$1;
#X msg 150 202 1 1 \$1;
#X text 230 321 in binary mode: <inlet# \, outlet# \, on/off>. In non binary mode: <inlet# \, outlet# \, gain \, ramp>, f 51;
#X text 190 557 -;
#X text 202 558 on <dump> messages \, rightmost outlet dumps a list with all connections: <inlet# \, outlet# \, gain>, f 49;
#X text 180 322 list;
#X text 218 322 -;
#X text 174 402 clear;
#X text 180 435 dump;
#X text 132 419 ramp <float>;
#X text 120 347 connect <list>;
#X text 102 374 disconnect <list>;
#X text 218 418 - sets ramp (fade) time - only in non-binary mode, f 53;
#X text 218 401 - removes all connections, f 53;
#X text 144 477 dumptarget;
#X text 174 462 print;
#X text 218 461 -;
#X text 218 435 -;
#X text 230 434 outputs current state of all connections in the rightmost outlet a list: <inlet# \, outlet# \, gain>, f 51;
#X text 218 476 -;
#X text 218 346 -;
#X text 230 347 connects any inlet specified by the 1st value to outlet(s) specified by remaining value(s), f 51;
#X text 218 373 -;
#X text 230 374 disconnects any inlet specified by the 1st value to outlet(s) specified by the remaining value(s);
#X text 230 461 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 420 223 pd binary/non-binary;
#X text 230 477 outputs target state of all connections in the rightmost outlet a list: <inlet# \, outlet# \, gain>, f 51;
#X text 204 656 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 60 Signal routing/mixing matrix;
#X floatatom 229 233 6 0 0 0 - - - 0;
#X floatatom 300 233 6 0 0 0 - - - 0;
#X obj 229 211 snapshot~;
#X obj 300 211 snapshot~;
#X obj 372 186 metro 100;
#X obj 372 164 loadbang;
#X text 50 85 [matrix~] routes signals from any inlets to one or more outlets. If an outlet connects to more than one inlet \, they are summed., f 64;
#X text 69 271 see also:;
#X obj 393 283 open-else;
#X text 426 260 click;
#X msg 393 261 mtx~;
#X text 139 266 Plugdata users or those with ELSE can also use [else/mtx~] as an alternative., f 39;
#X connect 20 0 68 0;
#X connect 20 1 69 0;
#X connect 21 0 20 0;
#X connect 22 0 20 1;
#X connect 24 0 20 0;
#X connect 29 0 30 0;
#X connect 30 0 28 0;
#X connect 31 0 32 0;
#X connect 32 0 28 0;
#X connect 34 0 36 0;
#X connect 35 0 37 0;
#X connect 36 0 33 0;
#X connect 37 0 33 0;
#X connect 68 0 66 0;
#X connect 69 0 67 0;
#X connect 70 0 69 0;
#X connect 70 0 68 0;
#X connect 71 0 70 0;
#X connect 76 0 74 0;
