detect and substitute an incoming integer or float contained within a list for a specified symbol

Dec 19, 2006 at 2:43pm

detect and substitute an incoming integer or float contained within a list for a specified symbol

#29292
Dec 19, 2006 at 5:18pm

#91200
Dec 19, 2006 at 6:23pm

#91201
Dec 19, 2006 at 6:29pm

This might help:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 597 468 34 196617 zl len;
#P newex 536 612 32 196617 print;
#P window linecount 2;
#P message 515 431 265 196617 ‘dog\, fish\, cat\, basketball
and an 80 year old can of peas’;
#P window linecount 1;
#P message 524 547 34 196617 many;
#P newex 527 578 46 196617 zl group;
#P newex 526 513 38 196617 sel 80;
#P newex 526 485 25 196617 iter;
#P connect 6 0 2 1;
#P connect 4 0 0 0;
#P connect 4 0 6 0;
#P connect 1 1 2 0;
#P connect 3 0 2 0;
#P connect 2 0 5 0;
#P connect 1 0 3 0;
#P connect 0 0 1 0;
#P window clipboard copycount 7;

jb

Am 19.12.2006 um 15:43 schrieb Jon Cambeul:

> any ideas would by very much appreciated

#91202
Dec 19, 2006 at 7:28pm

thanks for that f.e will be useful

the patch i’m writing is on the os 9.2 sorry i forgot to mention that to the
list.
would there be something compatible? im gong to check your suggestions now.

#91203
Dec 19, 2006 at 10:45pm

ah ha! thanks v much great help

best

jon c

On 12/19/06, Jeremy Bernstein wrote:
> This might help:
>
> #P window setfont “Sans Serif” 9.;
> #P window linecount 1;
> #P newex 597 468 34 196617 zl len;
> #P newex 536 612 32 196617 print;
> #P window linecount 2;
> #P message 515 431 265 196617 ‘dog\, fish\, cat\, basketball
> and an 80 year old can of peas’;
> #P window linecount 1;
> #P message 524 547 34 196617 many;
> #P newex 527 578 46 196617 zl group;
> #P newex 526 513 38 196617 sel 80;
> #P newex 526 485 25 196617 iter;
> #P connect 6 0 2 1;
> #P connect 4 0 0 0;
> #P connect 4 0 6 0;
> #P connect 1 1 2 0;
> #P connect 3 0 2 0;
> #P connect 2 0 5 0;
> #P connect 1 0 3 0;
> #P connect 0 0 1 0;
> #P window clipboard copycount 7;
>
> jb
>
> Am 19.12.2006 um 15:43 schrieb Jon Cambeul:
>
> > any ideas would by very much appreciated
>
>

#91204
Dec 19, 2006 at 11:49pm

fixed it

cheers jb

jon

max v2;
#N vpatcher 53 47 687 767;
#P newex 10 25 85 196617 route from;
#P message 353 660 159 196617 speak peas;
#P newex 347 631 60 196617 prepend set;
#P newex 330 604 84 196617 sprintf speak %s;
#P message 99 205 31 196617 clear;
#P message 87 678 159 196617 peas;
#P newex 108 649 60 196617 prepend set;
#P message 73 613 35 196617 eighty;
#P newex 99 585 30 196617 sel 0;
#P newex 143 556 38 196617 unpack;
#P comment 84 241 83 196617 remove commas;
#P comment 433 69 102 196622 2 then hear a few times;
#P newex 248 155 41 196617 random;
#P button 402 63 28 0;
#P message 99 27 335 196617 ‘how about this dog, fish, cat,
basketball and an 80 year old can of peas’;
#P newex 113 467 35 196617 t b i;
#P newex 106 527 35 196617 zl mth;
#P newex 247 367 42 196617 del 100;
#P number 266 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 434 607 45 196617 pitch $1;
#P newex 138 375 42 196617 del 100;
#P button 131 351 13 0;
#P message 144 411 13 196617 1;
#P message 286 266 14 196617 0;
#P newex 236 297 27 196617 gate;
#P newex 199 470 37 196617 + 1;
#P newex 240 496 37 196617 sel;
#P newex 241 330 38 196617 t b i;
#P newex 213 407 58 196617 Loop 0 0;
#P number 184 439 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 154 268 35 196617 zl len;
#P number 164 298 35 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 39 332 49 196617 zl slice 4;
#P newex 58 153 54 196617 t b s clear;
#P message 19 206 42 196617 line 1;
#P newex 23 238 57 196617 Text;
#P newex 50 95 62 196617 fromsymbol;
#P comment 296 154 136 196617 midi in normaly but random placed here
to trigger this;
#P comment 439 30 85 196622 1 click hear;
#P comment 418 633 100 196617 to speech object;
#P comment 195 46 83 196617 got it cheers jc;
#P connect 7 0 6 0;
#P connect 6 0 5 0;
#P connect 7 1 5 0;
#P connect 7 2 5 0;
#P connect 36 0 5 0;
#P connect 5 0 8 0;
#P connect 26 0 4 0;
#P connect 40 0 4 0;
#P connect 4 0 7 0;
#P connect 32 0 33 0;
#P connect 34 0 35 0;
#P connect 24 0 32 0;
#P connect 8 1 24 0;
#P connect 25 0 24 0;
#P connect 33 0 34 0;
#P connect 32 1 34 0;
#P connect 11 0 25 0;
#P connect 31 0 32 1;
#P connect 9 0 19 0;
#P connect 25 1 24 1;
#P connect 19 0 20 0;
#P connect 24 0 31 0;
#P connect 20 0 18 0;
#P connect 8 1 10 0;
#P connect 10 0 9 0;
#P connect 12 0 11 0;
#P connect 11 0 15 0;
#P connect 20 0 12 0;
#P connect 18 0 16 0;
#P connect 17 0 16 0;
#P connect 15 0 14 0;
#P connect 16 0 13 0;
#P connect 13 0 23 0;
#P connect 27 0 28 0;
#P connect 22 0 16 1;
#P connect 9 0 12 2;
#P connect 23 0 12 2;
#P connect 28 0 22 0;
#P connect 9 0 14 1;
#P connect 9 0 28 1;
#P fasten 14 0 17 0 245 522 368 522 368 256 291 256;
#P connect 32 1 37 0;
#P connect 33 0 37 0;
#P connect 37 0 38 0;
#P connect 38 0 39 0;
#P connect 13 1 21 0;
#P pop;

#91205
Dec 20, 2006 at 8:54am

#91206
Dec 20, 2006 at 9:54am

#91207
Dec 20, 2006 at 9:56am

try this, it uses [route in float] to filter out ints/floats and no
3rd parties to do what you need

hth

/*j

///////////////

max v2;
#N vpatcher 392 44 1026 799;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 110 440 36 196617 zl reg;
#P newex 233 434 13 196617 0;
#P newex 315 365 27 196617 – 1;
#P newex 287 258 53 196617 t 1 b i i;
#P newex 82 186 51 196617 route set;
#P newex 198 633 32 196617 print;
#P message 99 587 40 196617 enough;
#P message 64 588 34 196617 many;
#P newex 64 565 41 196617 sel 0 1;
#P newex 64 544 38 196617 decide;
#P newex 64 521 22 196617 b 1;
#P newex 64 495 82 196617 route int float;
#P comment 145 169 83 196617 remove commas;
#P comment 138 676 100 196617 to speech object;
#P message 136 657 265 196617 peas;
#P newex 136 633 60 196617 prepend set;
#P newex 214 291 41 196617 random;
#P button 214 200 15 0;
#P message 82 55 289 196617 “dog\, fish\, cat\, basketball and
an 80 year old can of peas”;
#P newex 197 412 35 196617 t b i;
#P newex 110 465 35 196617 zl mth;
#P newex 197 359 42 196617 del 100;
#P number 229 315 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 403 657 45 196617 pitch $1;
#P newex 197 314 27 196617 gate;
#P newex 233 412 32 196617 sel 1;
#P newex 197 336 59 196617 t b i;
#N counter;
#X flags 0 0;
#P newobj 197 388 66 196617 counter;
#P newex 287 235 35 196617 zl len;
#P number 346 253 35 9 0 0 32 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 82 207 64 196617 zl slice 3;
#P newex 82 112 54 196617 t b s clear;
#P message 82 135 42 196617 line 1;
#P newex 82 166 57 196617 Text;
#P newex 82 82 62 196617 fromsymbol;
#P comment 403 676 100 196617 to speech object;
#P comment 278 394 87 196617 standard external;
#P user panel 51 485 128 128;
#X brgb 255 127 0;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 86 37 287 196617 I had to change the symbol to max 4.5 /
OSX style for testing;
#P connect 18 0 27 0;
#P connect 27 1 28 0;
#P connect 27 0 28 0;
#P connect 28 0 29 0;
#P connect 29 0 30 0;
#P connect 30 0 31 0;
#P connect 20 0 4 0;
#P connect 4 0 7 0;
#P connect 7 0 6 0;
#P connect 7 2 5 0;
#P connect 7 1 5 0;
#P connect 6 0 5 0;
#P connect 5 0 34 0;
#P connect 34 0 8 0;
#P connect 30 1 32 0;
#P connect 19 0 38 0;
#P connect 38 0 18 0;
#P connect 19 1 18 1;
#P connect 8 1 38 1;
#P connect 32 0 23 0;
#P connect 31 0 23 0;
#P connect 27 2 23 0;
#P connect 23 0 24 0;
#P fasten 35 0 14 0 292 278 202 278;
#P fasten 37 0 14 0 238 455 183 455 183 278 202 278;
#P connect 14 0 12 0;
#P connect 12 0 17 0;
#P connect 17 0 11 0;
#P connect 11 0 19 0;
#P connect 32 0 33 0;
#P connect 31 0 33 0;
#P connect 27 2 33 0;
#P connect 21 0 22 0;
#P connect 22 0 14 1;
#P fasten 35 1 11 2 306 382 230 382;
#P connect 22 0 16 0;
#P connect 11 2 13 0;
#P connect 13 0 37 0;
#P connect 35 3 22 1;
#P fasten 36 0 11 4 320 385 258 385;
#P connect 8 1 10 0;
#P connect 10 0 35 0;
#P connect 35 2 36 0;
#P connect 10 0 9 0;
#P connect 12 1 15 0;
#P pop;

#91208
Dec 20, 2006 at 2:50pm

Jon Cambeul wrote:
> Ive tried many attempts to work around it but wondered if there was a
> simple solution.

Is this simple enough?

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 49 270 50 196617 itoa;
#P message 49 317 309 196617;
#P newex 49 293 60 196617 prepend set;
#P newex 49 247 46 196617 zl group;
#P newex 49 221 36 196617 spell;
#P message 185 130 42 196617 enough;
#P newex 49 176 23 196617 b;
#P message 171 112 36 196617 many;
#P newex 49 198 61 196617 zl reg many;
#P newex 109 124 27 196617 t i b;
#P newex 23 58 36 196617 t b b l;
#P newex 49 154 46 196617 zl group;
#P newex 49 103 70 196617 split 48 57;
#P newex 49 80 36 196617 spell;
#P message 23 34 289 196617 “dog\, fish\, cat\, basketball and an
80 year old can of peas”;
#P connect 7 0 6 1;
#P connect 8 0 6 0;
#P connect 9 0 6 1;
#P connect 6 0 10 0;
#P fasten 5 0 11 0 114 242 54 242;
#P connect 14 0 12 0;
#P connect 11 0 14 0;
#P connect 12 0 13 0;
#P fasten 4 0 11 0 28 244 54 244;
#P fasten 4 1 3 0 41 127 54 127;
#P connect 4 2 1 0;
#P connect 0 0 4 0;
#P connect 10 0 11 0;
#P fasten 5 1 3 0 131 148 54 148;
#P connect 2 1 5 0;
#P connect 3 0 8 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P window clipboard copycount 15;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#91209

You must be logged in to reply to this topic.