Forums > MaxMSP

List Comma problem

January 31, 2007 | 10:04 am

Hi,

I got an anoying problem.
I’d like to use a line, whose start value is not known in advance (i.e.
sampled).
So I intend to use a list to send to [line] in the format start value,
end value time.
The problem is that neither append nor prepend accept "," as argument so
I am not able to achieve it.
I guess I can find a solution, but not simply, so I ask here if someone
has an idea …
What I would like to do is approximately that :

$f [50] List [0 100]
l l
Process merging the two < - append, prepend do not accept commas
l
List [50,0 100]
l
[Line 50, 0 100]

Thx

Sylvain


January 31, 2007 | 10:21 am


January 31, 2007 | 10:22 am

On 31 Jan 2007, at 10:04, Sylvain Le Beux wrote:

> The problem is that neither append nor prepend accept "," as
> argument so I am not able to achieve it.

Try [prepend /,]

David


January 31, 2007 | 10:22 am

>Hi,
>
>I got an anoying problem.
>I’d like to use a line, whose start value is not known in advance
>(i.e. sampled).
>So I intend to use a list to send to [line] in the format start
>value, end value time.
>The problem is that neither append nor prepend accept "," as
>argument so I am not able to achieve it.
>I guess I can find a solution, but not simply, so I ask here if
>someone has an idea …
>What I would like to do is approximately that :
>
>$f [50] List [0 100]
> l l
> Process merging the two < - append, prepend do not accept commas
> l
> List [50,0 100]
> l
> [Line 50, 0 100]
>

[sprintf] ??

kasper

Kasper T. Toeplitz
noise, composition, bass, computer

http://www.sleazeArt.com

http://www.myspace.com/sleazeart


January 31, 2007 | 10:23 am

Hi slebeux,

[50, 0 100] would mean seperate messages of [50] and [0 100] to max, as far as I know. So if you send a [50] then [0 100] seperately, that’s the same thing, you don’t have to merge them in a list. The comma notation makes different messages to be sent from a single messagebox. Don’t forget to give special care to signal order though, 50 should be on right this time.

Hope it helps.
Batuhan



jln
January 31, 2007 | 10:25 am


January 31, 2007 | 11:26 am

oops – should be [prepend ,]

shows how often I use the escape character (not)

David

like this …

max v2;
#N vpatcher 648 130 1248 530;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 309 49 48 196617 loadbang;
#P message 312 91 34 196617 1000;
#P message 272 91 20 196617 10;
#P number 310 137 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 266 137 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 266 170 42 196617 pack i i;
#P button 215 33 32 0;
#P newex 216 91 40 196617 t b b b;
#P message 165 96 14 196617 1;
#P message 203 279 80 196617 1 , 10 1000;
#P newex 203 251 62 196617 prepend set;
#P number 203 137 35 9 0 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 203 188 39 196617 set $1;
#P newex 203 224 54 196617 prepend 0;
#P newex 266 192 58 196617 prepend \,;
#P fasten 14 0 6 0 314 78 170 78;
#P fasten 7 0 3 0 221 122 208 122;
#P connect 6 0 3 0;
#P connect 3 0 2 0;
#P fasten 0 0 1 0 271 216 208 216;
#P connect 2 0 1 0;
#P connect 1 0 4 0;
#P connect 4 0 5 0;
#P connect 8 0 7 0;
#P fasten 7 1 10 0 236 122 271 122;
#P connect 12 0 10 0;
#P connect 10 0 9 0;
#P connect 9 0 0 0;
#P fasten 14 0 12 0 314 78 277 78;
#P connect 11 0 9 1;
#P fasten 7 2 11 0 251 122 315 122;
#P connect 13 0 11 0;
#P fasten 14 0 13 0 314 78 317 78;
#P pop;


January 31, 2007 | 2:15 pm

And also pack 1 2 3 -> $1, $2 $3 (again this is two messages to line)

On 1/31/07 5:23 AM, "Batuhan" wrote:

>
> Hi slebeux,
>
> [50, 0 100] would mean seperate messages of [50] and [0 100] to max, as far as
> I know. So if you send a [50] then [0 100] seperately, that’s the same thing,
> you don’t have to merge them in a list. The comma notation makes different
> messages to be sent from a single messagebox. Don’t forget to give special
> care to signal order though, 50 should be on right this time.
>
> Hope it helps.
> Batuhan

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


January 31, 2007 | 2:38 pm

On 31-Jan-2007, at 11:21, Sylvain Le Beux wrote:
> As always, we only have to ask (explicit?) the question to find the
> answer.
> So, I find out that append accept "," if it is preceded by an "".
> It may be nice however for this feature to appear in the append or
> prepend help patch and not only in list help …

Max Topics, p.116 "Punctuation: Special Characters in Objects and
Messages"

Yes, you have to dig to find it. But the information is there.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter
Universal Binaries on the way
iCE: Sequencing, Recording &
Interface Building for |home | chez nous|
Max/MSP Extremely cool |bei uns | i nostri|
http://www.dspaudio.com/ http://www.castine.de


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