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
----------begin_max5_patcher---------- 597.3ocyWssbaBCD8Y3qPCO61QRHtkOj7RmNcvfZLY.ACRdpSxj+8hVgav0D aWwk5GrLrHzdNGs6pk2bc71VefK8POf9Fxw4MWGGvj1fS+8NdUoGxJSkvz7x pqp3Bk2FyyT7CJvdYg7OF+YsPIKdkqe.I9q3dyh8UEhRtBVHxGFq2qNZ83Ta Z4xNujpJpE+nkmoLPjgS5VMjejdD2Of9d+KUjCHod6yegDLDKhzJ.KdOxayS EoGeVSpJaWg3oAdHDyzKaP.LpwNhFq8g9Md20UOrYhRUsZGuc9zpgzlYMsAp RHy.sq3RY5S7ynMQfvHl.EKPcWR0i+Kh.cTQfb4.FZDrQRGMdwrLpWZ3lI64 MZnD0RMkgA2Rf.JRBDyRCmYQEq0xkRTuQAhXs.4Cgayh.I3+pCLmoOMsEBER 9R015xkIkCaI68CBAByLYdT1xjzgnHFJF08+hmrQXP0YFdBYaIVplAPtFKvT EirbgRKWw6XaSin9CRfH3nIEHcQxOuGxOf6QVxcZLDmQSfrm3fkf5scPmCTe 1pi3+o4Da5+MVtQ3zDIhuI6HjtHUZXq9AO11iGgZJ4Zjk.7RTr30RjPsC4Oc MgdwXkwzEea0ESieDSA7njkpKP5+6NVnVKPvQ1Fgwzw7YwMf+59ZHwe+YUv5 osepnIq22lcDsG62D8wwl4bopP.G0NXRgmLmcE44bwvRqUE4M0cUr6wvmrCd yPhb2AIs2nWAQwqNhHWAQ5lEWQHQuK21tFhhVUDkb2oQ2xtl+phH+a.QAmD9 eOrqMEMp6l2c+MfHZOFV -----------end_max5_patcher-----------
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.
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
> Peter McCulloch
> Demo patch:
----------begin_max5_patcher---------- > 597.3ocyWssbaBCD8Y3qPCO61QRHtkOj7RmNcvfZLY.ACRdpSxj+8hVgav0D > aWwk5GrLrHzdNGs6pk2bc71VefK8POf9Fxw4MWGGvj1fS+8NdUoGxJSkvz7x > pqp3Bk2FyyT7CJvdYg7OF+YsPIKdkqe.I9q3dyh8UEhRtBVHxGFq2qNZ83Ta > Z4xNujpJpE+nkmoLPjgS5VMjejdD2Of9d+KUjCHod6yegDLDKhzJ.KdOxayS > EoGeVSpJaWg3oAdHDyzKaP.LpwNhFq8g9Md20UOrYhRUsZGuc9zpgzlYMsAp > RHy.sq3RY5S7ynMQfvHl.EKPcWR0i+Kh.cTQfb4.FZDrQRGMdwrLpWZ3lI64 > MZnD0RMkgA2Rf.JRBDyRCmYQEq0xkRTuQAhXs.4Cgayh.I3+pCLmoOMsEBER > 9R015xkIkCaI68CBAByLYdT1xjzgnHFJF08+hmrQXP0YFdBYaIVplAPtFKvT > EirbgRKWw6XaSin9CRfH3nIEHcQxOuGxOf6QVxcZLDmQSfrm3fkf5scPmCTe > 1pi3+o4Da5+MVtQ3zDIhuI6HjtHUZXq9AO11iGgZJ4Zjk.7RTr30RjPsC4Oc > MgdwXkwzEea0ESieDSA7njkpKP5+6NVnVKPvQ1Fgwzw7YwMf+59ZHwe+YUv5 > osepnIq22lcDsG62D8wwl4bopP.G0NXRgmLmcE44bwvRqUE4M0cUr6wvmrCd > yPhb2AIs2nWAQwqNhHWAQ5lEWQHQuK21tFhhVUDkb2oQ2xtl+phH+a.QAmD9 > eOrqMEMp6l2c+MfHZOFV > -----------end_max5_patcher-----------
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.
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.
Forums > MaxMSP