List problem with lists that begin with symbols
It looks like lists that begin with symbols are not seen as lists, but
they're also not considered symbols. This seems a bit odd, in that it
creates a new message type. (and that type is not detectable as a
class, but only as what it isn't) Has this always been the case?
Max 5.0.5 OSX 10.5.6
thanks,
Peter McCulloch
Demo patch:
Someone more pedantic than I will probably post something more
accurate, but I believe it works like this:a combination of
is technically not a list -- objects will tend to interpret
them as a command followed by data (e.g. 'set 54'). Some objects will
treat such a thing as a list, some won't -- if there is rhyme or
reason to which or why I don't know what it is, but route is very picky.
If I remember correctly, some other objects which could be cranky
about this would improve their behavior (in 4, at least) if you
prepended 'list' to your not-really-a-list, but I just checked and
rout isn't buying it. You could just prepend an integer before you
send it to the route -- not pretty, but it works.
M
On Feb 19, 2009, at 11:24 AM, Peter McCulloch wrote:
> It looks like lists that begin with symbols are not seen as lists, but
> they're also not considered symbols. This seems a bit odd, in that it
> creates a new message type. (and that type is not detectable as a
> class, but only as what it isn't) Has this always been the case?
>
> Max 5.0.5 OSX 10.5.6
>
> thanks,
> Peter McCulloch
>
> Demo patch:
>
>
Not to be pedantic, but in Max, lists *must* begin with a number.
Must means must.
Anything beginning with a symbol is a *message*. If anything comes after the initial symbol, it is part of the parameter list for that message.
That's just the way Max works.
There are a very, very few objects that will treat a message-with-parameters the same way the treat a list. But they are exceptions.
Oh! Oh! Plug opportunity alert!...: lp.crabelms, for instance, which is a reincarnation of James McCarthy's orphaned [scramble] object (with numerous enhancements), allows you to scramble the elements of a list. And it treats messages like lists, so you can send the sequence of single-character symbols 's c r a m b l e' to [lp.crabelms] and you might get the sequence of single-character 'c r a b e l m s' as a result.
Of course, neither sequence is a Max list.
Um... [zl] treats anything like a list. Seeing as how it is billed as "Multi-purpose list processing" and refers to lists throughout the help file, I could see where Peter M. would get confused.
You have to clarify the list as:
1) a datatype
2) a message with multiple items (aka a list)
[zl] deals with 2. [route list] will deal with 1.
BTW, [zl] and [trigger] get my votes for most useful Max objects ever. If I had to choose... that would be tough.
--NW
Quote: nathan wolek wrote on Fri, 20 February 2009 20:06
----------------------------------------------------
> Um... [zl] treats anything like a list. Seeing as how it is billed as "Multi-purpose list processing" and refers to lists throughout the help file, I could see where Peter M. would get confused.
>
> You have to clarify the list as:
> 1) a datatype
> 2) a message with multiple items (aka a list)
>
> [zl] deals with 2. [route list] will deal with 1.
As Peter said in the Max terminology, a list is a group of items where the first one is either an int or a float. [zl] object in fact treats the list and messages in a different way inside, so it's easier to deal with in the Max world.
ej