#N canvas 238 446 954 407 10;
#X obj 45 29 inlet;
#N canvas 147 136 871 639 \$0-poly 0;
#X restore 36 254 pd \$0-poly;
#X obj 139 31 inlet;
#X obj 256 63 loadbang;
#X obj 256 108 f \$1;
#N canvas 0 0 887 513 \$0-fill-subpatch 0;
#N canvas 0 0 450 300 clear 0;
#X obj 97 62 inlet;
#X msg 97 84 clear;
#X obj 97 106 outlet;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X restore 701 225 pd clear;
#N canvas 0 0 890 392 fake-inout 0;
#X obj 102 62 inlet;
#X msg 102 85 bang;
#X text 149 108 fake in/outlets;
#X obj 102 223 outlet;
#X obj 102 108 f \$0;
#X msg 102 181 obj 60 60 r \$1-state \, obj 650 54 r \$1-probs \, obj
60 600 s \$1-nextstate;
#X connect 0 0 1 0;
#X connect 1 0 4 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
#X restore 596 225 pd fake-inout;
#X msg 701 180 bang;
#X msg 596 181 bang;
#N canvas 132 170 1000 587 make-one-object 0;
#X obj 94 38 inlet;
#X obj 94 550 outlet;
#X obj 182 36 inlet;
#X obj 126 95 + 1;
#X msg 182 61 0;
#X obj 94 96 f 0;
#X obj 94 64 t b a;
#X obj 395 155 * 30;
#X obj 395 268 list append;
#X text 485 271 append object name and arguments;
#X obj 117 153 + 5;
#X text 474 235 x \, y;
#X obj 395 234 pack 0 0;
#X obj 395 291 list prepend obj;
#X obj 395 315 list trim;
#X obj 395 180 + 150;
#X obj 94 124 t a a a;
#X obj 94 178 pack 0 0;
#X text 166 179 route outlet \, obj index;
#X obj 395 207 swap 350;
#X msg 94 404 connect 4 \$1 \$2 0 \, connect 3 \$1 \$2 1 \, connect
\$2 0 2 0 \,;
#X text 107 378 connect route \, connect select \, connect outlet;
#X connect 0 0 6 0;
#X connect 2 0 4 0;
#X connect 3 0 5 1;
#X connect 4 0 5 1;
#X connect 5 0 3 0;
#X connect 5 0 16 0;
#X connect 6 0 5 0;
#X connect 6 1 8 1;
#X connect 7 0 15 0;
#X connect 8 0 13 0;
#X connect 10 0 17 1;
#X connect 12 0 8 0;
#X connect 13 0 14 0;
#X connect 14 0 1 0;
#X connect 15 0 19 0;
#X connect 16 0 17 0;
#X connect 16 1 10 0;
#X connect 16 2 7 0;
#X connect 17 0 20 0;
#X connect 19 0 12 0;
#X connect 19 1 12 1;
#X connect 20 0 1 0;
#X restore 151 265 pd make-one-object;
#X msg 274 241 bang;
#X obj 151 213 until;
#X obj 151 193 max;
#X text 380 171 make [route];
#X obj 330 171 f;
#X obj 330 402 outlet;
#X obj 151 243 list;
#X text 187 244 obj+args;
#X obj 151 171 f;
#X obj 83 34 inlet;
#X text 83 13 object count;
#X obj 355 50 inlet;
#X text 355 29 object names and arguments;
#X obj 151 83 t f b f b b;
#X obj 83 57 t b f;
#X msg 83 264 loadbang;
#X msg 128 35 10;
#N canvas 0 0 850 444 make-and-connect-route-and-select 0;
#X obj 53 53 inlet;
#X obj 300 280 list trim;
#X text 37 264 connect [route];
#X obj 300 351 outlet;
#X obj 300 168 f;
#X obj 53 128 t b f;
#N canvas 0 0 450 300 count-0-to-x 0;
#X obj 150 128 max;
#X obj 150 153 until;
#X obj 185 181 + 1;
#X obj 150 210 list prepend;
#X obj 150 181 f 1;
#X obj 250 212 t a;
#X obj 125 91 t b a b b;
#X obj 125 242 list;
#X obj 125 272 outlet;
#X obj 125 61 inlet;
#X msg 196 153 0;
#X connect 0 0 1 0;
#X connect 1 0 4 0;
#X connect 2 0 4 1;
#X connect 3 0 5 0;
#X connect 3 0 7 1;
#X connect 4 0 2 0;
#X connect 4 0 3 0;
#X connect 5 0 3 1;
#X connect 6 0 7 0;
#X connect 6 1 0 0;
#X connect 6 2 10 0;
#X connect 6 3 3 1;
#X connect 7 0 8 0;
#X connect 9 0 6 0;
#X connect 10 0 4 1;
#X restore 300 201 pd count-0-to-x;
#X obj 523 281 list trim;
#X obj 300 227 t a a;
#X msg 53 199 connect 0 0 4 0 \, connect 1 0 3 0;
#X obj 300 254 list prepend obj 60 100 select;
#X obj 523 255 list prepend obj 650 100 route;
#X connect 0 0 5 0;
#X connect 1 0 3 0;
#X connect 4 0 6 0;
#X connect 5 0 9 0;
#X connect 5 1 4 0;
#X connect 6 0 8 0;
#X connect 7 0 3 0;
#X connect 8 0 10 0;
#X connect 8 1 11 0;
#X connect 9 0 3 0;
#X connect 10 0 1 0;
#X connect 11 0 7 0;
#X restore 330 195 pd make-and-connect-route-and-select;
#X msg 339 144 5;
#X msg 242 51 u_wrandom;
#X connect 0 0 10 0;
#X connect 1 0 10 0;
#X connect 2 0 0 0;
#X connect 3 0 1 0;
#X connect 4 0 10 0;
#X connect 5 0 4 1;
#X connect 6 0 11 0;
#X connect 7 0 6 0;
#X connect 9 0 22 0;
#X connect 11 0 4 0;
#X connect 13 0 7 0;
#X connect 14 0 19 0;
#X connect 16 0 11 1;
#X connect 18 0 13 0;
#X connect 18 1 5 0;
#X connect 18 2 9 0;
#X connect 18 3 3 0;
#X connect 18 4 2 0;
#X connect 19 0 20 0;
#X connect 19 1 18 0;
#X connect 20 0 10 0;
#X connect 21 0 19 0;
#X connect 22 0 10 0;
#X connect 23 0 9 0;
#X connect 24 0 11 1;
#X restore 256 217 pd \$0-fill-subpatch;
#X obj 256 135 t a b;
#X obj 256 247 s pd-\$0-poly;
#X text 494 105 based on: polypoly;
#X obj 386 191 list append u_wrandom;
#X obj 139 77 s \$0-probs;
#X obj 36 346 outlet;
#X obj 36 287 r \$0-nextstate;
#X obj 56 158 r \$0-nextstate;
#X obj 27 189 s \$0-state;
#X obj 27 157 f;
#X obj 45 79 route set;
#N canvas 228 198 627 317 LICENSE-BSD 0;
#X text 121 56 This software is copyrighted by Miller Puckette \, Reality
Jockey Ltd. and others. The terms (the "Standard Improved BSD License")
apply to all files associated with the software unless explicitly disclaimed
in individual files.;
#X text 123 148 See the file LICENSE.txt for the full license text.
;
#X restore 372 34 pd LICENSE-BSD;
#X text 495 29 usage: u_markov <max number of states>;
#X connect 0 0 16 0;
#X connect 2 0 10 0;
#X connect 3 0 4 0;
#X connect 4 0 6 0;
#X connect 5 0 7 0;
#X connect 6 0 5 0;
#X connect 6 1 9 0;
#X connect 9 0 5 1;
#X connect 12 0 11 0;
#X connect 13 0 15 1;
#X connect 15 0 14 0;
#X connect 16 0 15 1;
#X connect 16 1 15 0;
