#N canvas 196 159 931 548 10;
#X msg 488 56 bang;
#X obj 511 175 print urne;
#X obj 539 150 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 562 58 seed 10;
#X msg 564 81 clear;
#X floatatom 556 129 5 0 0 0 - - -;
#X msg 490 271 bang;
#N canvas 0 0 450 300 display 0;
#X obj 46 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 63 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 80 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 97 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 114 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 156 135 list append 0;
#X obj 46 134 list append 1;
#N canvas 0 0 450 300 count 0;
#X obj 158 193 + 1;
#X obj 122 158 until;
#X obj 122 194 f;
#X obj 122 101 inlet;
#X msg 167 157 0;
#X obj 122 120 t a b;
#X obj 122 224 outlet;
#X connect 0 0 2 1;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X connect 2 0 6 0;
#X connect 3 0 5 0;
#X connect 4 0 2 1;
#X connect 5 0 1 0;
#X connect 5 1 4 0;
#X restore 156 90 pd count;
#X obj 46 160 route 0 1 2 3 4 5 6 7 8 9;
#X obj 131 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 148 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 165 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 182 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 199 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X obj 46 36 inlet;
#X obj 156 37 inlet;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 7 0 5 0;
#X connect 8 0 0 0;
#X connect 8 1 1 0;
#X connect 8 2 2 0;
#X connect 8 3 3 0;
#X connect 8 4 4 0;
#X connect 8 5 9 0;
#X connect 8 6 10 0;
#X connect 8 7 11 0;
#X connect 8 8 12 0;
#X connect 8 9 13 0;
#X connect 14 0 6 0;
#X connect 15 0 7 0;
#X coords 0 -1 1 1 180 40 1 40 170;
#X restore 490 419 pd display;
#X msg 508 295 clear \, bang;
#X obj 534 348 t b b;
#X obj 534 368 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 663 393 f 10;
#X floatatom 557 325 5 0 0 0 - - -;
#N canvas 0 0 450 300 display 0;
#X obj 46 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 63 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 80 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 97 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 114 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 156 135 list append 0;
#X obj 46 134 list append 1;
#N canvas 0 0 450 300 count 0;
#X obj 158 193 + 1;
#X obj 122 158 until;
#X obj 122 194 f;
#X obj 122 101 inlet;
#X msg 167 157 0;
#X obj 122 120 t a b;
#X obj 122 224 outlet;
#X connect 0 0 2 1;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X connect 2 0 6 0;
#X connect 3 0 5 0;
#X connect 4 0 2 1;
#X connect 5 0 1 0;
#X connect 5 1 4 0;
#X restore 156 90 pd count;
#X obj 46 160 route 0 1 2 3 4 5 6 7 8 9;
#X obj 131 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 148 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 165 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 182 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 199 191 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
#X obj 46 36 inlet;
#X obj 156 37 inlet;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 7 0 5 0;
#X connect 8 0 0 0;
#X connect 8 1 1 0;
#X connect 8 2 2 0;
#X connect 8 3 3 0;
#X connect 8 4 4 0;
#X connect 8 5 9 0;
#X connect 8 6 10 0;
#X connect 8 7 11 0;
#X connect 8 8 12 0;
#X connect 8 9 13 0;
#X connect 14 0 6 0;
#X connect 15 0 7 0;
#X coords 0 -1 1 1 180 40 1 40 170;
#X restore 488 200 pd display;
#X obj 661 173 f 10;
#X obj 661 147 b;
#X obj 507 392 print urne_auto;
#X obj 488 130 c_urn 10;
#X text 20 27 c_urn - Unique Random Number generator;
#X obj 490 325 c_urn 10;
#N canvas 377 111 827 710 REFERENCE 0;
#X text 114 121 Name: c_urn;
#X text 114 140 Summary: Unique Random Number generator;
#X text 114 159 Argument 0: int - range of random numbers in urn (optional)
;
#X text 114 178 Inlet 0: bang: output next random number without repetitions
\, clear: put all numbers back into urn \, seed NUM: seed random number
generator;
#X text 114 219 Inlet 1: int: set range of random numbers and reset
the urn.;
#X text 116 245 Outlet 0: random number from 0 to <range - 1> \, without
repetitions.;
#X text 117 283 Outlet 1: bang \, when an empty urn receives a bang
into first inlet. You may use this outlet to make the urn refill automatically
if it gets empty.;
#X text 117 335 Description: [c_urn] generates random numbers without
repetition. Clone of the Max object [urn] and RTC/urne. Stops when
all values have been chosen and bangs right outlet. Send "clear" message
to make it start over.;
#X text 122 529 Tags: random \, urn \, repetition;
#X coords 0 -1 1 1 450 450 1 100 100;
#X restore 19 48 pd REFERENCE;
#X text 484 463 This example shows how the the second outlet can be
used to refill the urn automatically if it gets empty with a combined
"clear \, bang" message.;
#X connect 0 0 17 0;
#X connect 3 0 17 0;
#X connect 4 0 15 0;
#X connect 4 0 17 0;
#X connect 5 0 14 0;
#X connect 5 0 17 1;
#X connect 6 0 19 0;
#X connect 8 0 19 0;
#X connect 9 0 8 0;
#X connect 9 0 10 0;
#X connect 9 1 11 0;
#X connect 11 0 7 1;
#X connect 12 0 11 0;
#X connect 12 0 19 1;
#X connect 14 0 13 1;
#X connect 15 0 14 0;
#X connect 17 0 1 0;
#X connect 17 0 13 0;
#X connect 17 1 2 0;
#X connect 19 0 7 0;
#X connect 19 0 16 0;
#X connect 19 1 9 0;
