hi

maybe the attached one is a start.
it makes a pair of noteOns and velocitys

$1-länge the lengths of the note is randomly set to a length with the power of 2-pause sets the length of the possible pause
$1-kompbang starts the process


yours sincerely
der.brandt





Zitat von "matt tytel" <matthewty...@gmail.com>:

Ah thanks,
If I wanted to initialize an array with some other data (basically i want to come up with a rand score) is there a good way to do that?


On Apr 8, 2012, at 10:40 PM, Jonathan Wilkes <jancs...@yahoo.com> wrote:

It's pretty easy if you don't mind having dsp on:

[noise~]
|
|  [bang(
| /
[tabwrite~ foo]

[table foo]

From: Matthew Tytel <matthewty...@gmail.com>
To: pd-list@iem.at
Sent: Monday, April 9, 2012 1:23 AM
Subject: [PD] Initializing an array with random data.

Hi there,

I'm looking for a good way to reinitialize data in an array with random data. Basically I want to be able to bang a subpatch and have it enter totally new randomized data into it. I made one using the step object but it's very hacked together. Any suggestions?

Apologies if this isn't the right place to ask,
Matt

_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list




#N canvas 626 36 587 336 10;
#X obj 155 45 until;
#X obj 169 91 f;
#X msg 184 25 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$1-note 64 float 0;
#X coords 0 127 63 0 200 140 1;
#X restore 369 135 graph;
#X msg 155 24 64;
#X obj 155 70 t b b b b b b;
#X obj 283 70 t b f;
#X msg 284 92 2;
#X obj 287 115 pow;
#X obj 243 65 t b f;
#X msg 244 87 2;
#X obj 247 110 pow;
#X obj 208 184 select;
#X obj 169 136 select;
#X obj 169 157 t b b;
#X obj -2 145 f;
#X obj 208 203 t b b b;
#X msg 208 225 0;
#X obj 203 115 +;
#X obj 241 164 +;
#X obj 154 3 t b b b b b b;
#X obj 195 91 + 1;
#X msg 218 26 0;
#X obj 86 226 f;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$1-vel 64 float 0;
#X coords 0 127 63 0 200 140 1;
#X restore 369 -8 graph;
#X obj 69 89 random 24;
#X obj -2 187 tabwrite \$1-note;
#X obj 86 247 tabwrite \$1-vel;
#X obj 154 -16 r \$1-kompbang;
#X obj -2 166 +;
#X obj 37 87 * 12;
#X obj 38 68 + 1;
#X obj 39 47 random 3;
#X obj 103 187 random 30;
#X obj 101 205 + 50;
#X floatatom 304 154 5 0 0 0 - - -;
#X obj 243 29 random 4;
#X obj 282 49 random 4;
#X obj 327 -14 r \$1-l�nge;
#X obj 259 -15 r \$1-pause;
#X obj 67 -14 loadbang;
#X obj 67 7 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X connect 0 0 5 0;
#X connect 1 0 12 0;
#X connect 1 0 13 0;
#X connect 1 0 18 1;
#X connect 1 0 21 0;
#X connect 1 0 26 1;
#X connect 1 0 27 1;
#X connect 2 0 1 1;
#X connect 4 0 0 0;
#X connect 5 0 15 0;
#X connect 5 0 23 0;
#X connect 5 1 1 0;
#X connect 6 0 7 0;
#X connect 6 1 8 1;
#X connect 7 0 8 0;
#X connect 8 0 19 0;
#X connect 9 0 10 0;
#X connect 9 1 11 1;
#X connect 10 0 11 0;
#X connect 11 0 18 0;
#X connect 11 0 35 0;
#X connect 12 0 16 0;
#X connect 13 0 14 0;
#X connect 14 0 25 0;
#X connect 14 0 33 0;
#X connect 14 1 37 0;
#X connect 15 0 29 0;
#X connect 16 0 17 0;
#X connect 16 1 36 0;
#X connect 17 0 27 0;
#X connect 18 0 19 1;
#X connect 18 0 13 1;
#X connect 19 0 12 1;
#X connect 20 0 4 0;
#X connect 20 2 2 0;
#X connect 20 3 36 0;
#X connect 20 4 37 0;
#X connect 20 5 22 0;
#X connect 20 5 32 0;
#X connect 21 0 1 1;
#X connect 22 0 18 1;
#X connect 22 0 19 1;
#X connect 23 0 27 0;
#X connect 25 0 15 1;
#X connect 28 0 20 0;
#X connect 29 0 26 0;
#X connect 30 0 29 1;
#X connect 31 0 30 0;
#X connect 32 0 31 0;
#X connect 33 0 34 0;
#X connect 34 0 23 1;
#X connect 36 0 9 0;
#X connect 37 0 6 0;
#X connect 38 0 37 1;
#X connect 39 0 36 1;
#X connect 40 0 20 0;
#X connect 41 0 20 0;
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to