#N canvas 389 23 558 628 10;
#X declare -stdpath ./;
#X obj 4 351 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 5 509 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 5 544 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 80 360 cnv 17 3 98 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 80 464 cnv 17 3 17 empty empty 1 5 9 0 16 #dcdcdc #9c9c9c 0;
#X floatatom 158 241 5 0 0 0 - - - 0;
#X obj 198 183 metro 300;
#X obj 198 158 tgl 15 0 empty empty empty 0 -6 0 8 #dcdcdc #000000 #000000 0 1;
#X obj 80 518 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 80 486 cnv 17 3 17 empty empty 2 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 198 240 hradio 15 1 0 13 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0;
#X text 171 360 -;
#X text 140 360 bang;
#X text 171 381 -;
#X text 133 381 float;
#X text 171 403 -;
#X text 139 403 list;
#X text 171 465 -;
#X text 133 465 float;
#X text 171 487 -;
#X text 133 487 float;
#X text 133 521 float;
#X text 115 551 1) float;
#X text 115 569 2) float;
#X text 171 521 - random number output as result of the drunken walk;
#X text 93 422 seed <float> -;
#X text 99 443 set <float> -;
#X text 189 422 seeds the internal random number generator, f 50;
#X text 189 443 sets the current value (without output), f 51;
#X text 186 465 sets upper bound, f 58;
#X text 186 487 sets stepsize, f 58;
#X obj 198 264 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 169 182 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 186 360 triggers a random output, f 58;
#X text 171 569 - sets maximum stepsize (default 2);
#X text 171 551 - sets maximum value (default 128);
#X text 71 91 [drunk] generates random numbers within a given step range from the current number (generating a "drunk walk"). The random number is from 0 to a given maximum and differs from the previous number by a random value less than the given step size.;
#X floatatom 268 187 5 0 10 0 - - - 0;
#X floatatom 339 187 5 0 5 0 - - - 0;
#X text 260 159 maximum;
#X text 263 170 output;
#X text 338 160 step;
#X text 338 171 size;
#X obj 1 593 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#N canvas 401 94 754 394 examples 0;
#X obj 112 49 tgl 18 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000 0 1;
#X obj 112 84 metro 250;
#X obj 112 205 makenote 127 250;
#X floatatom 368 140 5 0 0 0 - - - 0;
#X msg 344 107 set \$1;
#X floatatom 344 88 5 0 0 0 - - - 0;
#X msg 404 199 10 20 4;
#X obj 344 239 cyclone/drunk 10;
#X floatatom 344 273 5 0 0 0 - - - 0;
#X obj 344 305 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 112 118 cyclone/drunk 30 6;
#X obj 112 149 + 40;
#X obj 112 175 change;
#N canvas 808 403 328 303 osc 0;
#X obj 199 47 inlet;
#X obj 57 48 inlet;
#X obj 57 78 mtof;
#X obj 57 110 phasor~;
#X obj 199 82 / 127;
#X obj 184 182 *~;
#X obj 184 213 outlet~;
#X obj 57 142 cyclone/triangle~ 0.7;
#X obj 199 152 line~;
#X msg 199 120 \$1 50;
#X connect 0 0 4 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 7 0;
#X connect 4 0 9 0;
#X connect 5 0 6 0;
#X connect 7 0 5 0;
#X connect 8 0 5 1;
#X connect 9 0 8 0;
#X restore 112 234 pd osc;
#X text 133 49 random melody generator;
#X floatatom 70 206 5 0 0 0 - - - 0;
#X msg 387 168 5 6;
#X obj 306 172 bng 18 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X obj 70 228 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X text 387 88 sets a current value but doesn't output it;
#X text 408 141 sets a current value and outputs it;
#X text 418 168 sets current and maximum values;
#X text 456 196 sets current \, maximum and step size values;
#X obj 112 280 output~;
#X obj 548 293 declare -stdpath ./;
#X connect 0 0 1 0;
#X connect 1 0 10 0;
#X connect 2 0 13 0;
#X connect 2 1 13 1;
#X connect 3 0 7 0;
#X connect 4 0 7 0;
#X connect 5 0 4 0;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 10 0 11 0;
#X connect 11 0 12 0;
#X connect 12 0 2 0;
#X connect 12 0 15 0;
#X connect 13 0 23 0;
#X connect 15 0 18 0;
#X connect 16 0 7 0;
#X connect 17 0 7 0;
#X restore 447 243 pd examples;
#X text 186 381 sets new current value and outputs it, f 58;
#X text 186 403 of floats sets <value \, maximum \, step size> in this order;
#X obj 198 214 cyclone/drunk 12 3, f 24;
#X obj 4 2 ./header drunk;
#X text 25 63 Random drunk walk;
#X text 47 305 see also:;
#X obj 393 318 open-else;
#X text 451 296 click;
#X text 124 299 Plugdata users or those with ELSE can also use [else/drunkard] as an alternative, f 42;
#X msg 393 296 drunkard;
#X connect 6 0 47 0;
#X connect 7 0 6 0;
#X connect 10 0 31 0;
#X connect 32 0 47 0;
#X connect 37 0 47 1;
#X connect 38 0 47 2;
#X connect 47 0 5 0;
#X connect 47 0 10 0;
#X connect 54 0 51 0;
