Forums > MaxMSP

need help with "set $" and lists

November 26, 2008 | 7:45 pm

I was tweaking with lists and suddenly I’ve discovered that "set $"
goes till number 9.
how can I do something like "set $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17" ?


November 26, 2008 | 7:53 pm

>I tweaking with lists and suddenly I’ve discovered that "set $"
>goes till number 9.
>how can I do something like "set $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11
>$12 $13 $14 $15 $16 $17" ?
>_

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 110 297 38 196617 zl join;
#P message 283 257 112 196617 $1 $2 $3 $4 $5 $6 $7;
#P newex 122 176 57 196617 zl slice 10;
#P window linecount 3;
#P message 110 324 103 196617 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;
#P window linecount 1;
#P message 95 256 180 196617 set $1 $2 $3 $4 $5 $6 $7 $8 $9 $10;
#P message 121 142 208 196617 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17;
#P connect 4 0 5 1;
#P connect 1 0 5 0;
#P connect 5 0 2 0;
#P connect 3 1 4 0;
#P connect 3 0 1 0;
#P connect 0 0 3 0;
#P window clipboard copycount 6;

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

http://www.myspace.com/sleazeart


November 26, 2008 | 8:08 pm

many thanks kasper…


November 26, 2008 | 8:36 pm

Note that you can’t use $10. It looked like it worked in Kasper’s example, but it really didn’t. If you use $10 it will actually give you a symbol consisting of the first argument to the list ($1) concatenated with the 0.

So, Kasper’s example would be better put like below.

Rob

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 100 240 38 9109513 zl join;
#P message 273 200 109 9109513 $1 $2 $3 $4 $5 $6 $7 $8;
#P newex 112 119 44 9109513 zl slice 9;
#P message 100 267 254 9109513 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1;
#P message 85 199 138 9109513 set $1 $2 $3 $4 $5 $6 $7 $8 $9;
#P message 111 85 181 9109513 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1;
#P connect 3 1 4 0;
#P connect 3 0 1 0;
#P connect 0 0 3 0;
#P connect 5 0 2 0;
#P connect 1 0 5 0;
#P connect 4 0 5 1;
#P window clipboard copycount 6;


November 26, 2008 | 8:37 pm

yes I’ve allready fixed that thank you indeed


November 26, 2008 | 8:40 pm

also note that in a lot of situations using [prepend set] instead is easier, especially if you don’t know the size of the incoming list.


November 26, 2008 | 8:42 pm

you mean that with a list of 50 numbers PREPEND SET would fix all without splicing?


November 26, 2008 | 8:54 pm

>Note that you can’t use $10. It looked like it worked in Kasper’s
>example, but it really didn’t. If you use $10 it will actually give
>you a symbol consisting of the first argument to the list ($1)
>concatenated with the 0.

yeah, i actually was surprised to see it working with $10, but –
well, it seemed to work !!!

kasper


November 26, 2008 | 9:15 pm

On Nov 26, 2008, at 12:42 PM, Giorgio Sancristoforo wrote:

> you mean that with a list of 50 numbers PREPEND SET would fix all
> without splicing?

It works in Max 5, and I’m pretty sure it would work in Max 4

– Pasted Max Patch, click to expand. –

- C

Chris Muir
cbm@well.com

http://www.xfade.com


Viewing 9 posts - 1 through 9 (of 9 total)