Minor confusion about "symbol"
Pretty new to Max here. I'm reviewing Max objects I picked up in the
tutorials. Now something I don't get and having checked both tutorial and
reference and playing around I'm here asking.
>From the reference manual :
" symbol The word symbol, followed by a symbol, stores that symbol in the $1
argument, then sends out the contents of the message box."
First having scoured around it seems symbol can be anything, number or word
, is that right ?
Yet I'm doing something like below and get a max window error : bad
arguments for message "symbol".
I must be missing something.
Changing the third messagebox to a print and replacing 440 with a symbol seems to work.
In your example it will treat '440' as an int and is thus a bad argument for the 'symbol' message.
On 6/3/07, alexander wrote:
>
>
> max v2;
> #N vpatcher 19 57 532 457;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P newex 29 117 32 196617 print;
> #P message 29 93 18 196617 $1;
> #P message 29 69 138 196617 symbol fourhundredandforty;
> #P window linecount 0;
> #P message 71 488 50 196617;
> #P window linecount 1;
> #P message 71 391 55 196617 symbol OK;
> #P window linecount 0;
> #P message 71 488 50 196617;
> #P window linecount 1;
> #P message 71 391 55 196617 symbol OK;
> #P window linecount 0;
> #P message 71 488 50 196617;
> #P window linecount 1;
> #P message 71 391 55 196617 symbol OK;
> #P connect 6 0 7 0;
> #P connect 7 0 8 0;
> #P connect 0 0 1 0;
> #P connect 2 0 3 0;
> #P connect 4 0 5 0;
> #P pop;
>
> Changing the third messagebox to a print and replacing 440 with a symbol
> seems to work.
> In your example it will treat '440' as an int and is thus a bad argument
> for the 'symbol' message.
> --
> - Alexander
May I ask then what exactly is a symbol ? In the manual I saw 3 examples
using symbol , 2 were symbol append and symbol set , both were using int.
The 3rd showed an example of "symbol OK " to an if statement where the
condition was something like "if $f2 < $f3...
SA
"symbol OK" is a symbol
"symbol 1" is a symbol
"OK" is a symbol
"1" is not
i highly recommend the third party object [printit]
and its use together with [print] - this helps a lot
to understand lists and symbols in max.
-110
As being new to max, I would strongly recommend using the software without third party externals to really get to know it; filling the gaps with externals once you exhaust the tutorials, examples etcetera!
No offence to the above advice!
Alexander,
No offense taken but where did I say anything about 3rd party externals in
this thread? Unless "symbol" is an external.
DA
On 6/4/07, alexander wrote:
>
>
> As being new to max, I would strongly recommend using the software without
> third party externals to really get to know it; filling the gaps with
> externals once you exhaust the tutorials, examples etcetera!
>
> No offence to the above advice!
> --
> - Alexander
>
Quote: sambient wrote on Mon, 04 June 2007 19:21
----------------------------------------------------
> Alexander,
>
> No offense taken but where did I say anything about 3rd party externals in
> this thread? Unless "symbol" is an external.
I think he was referring to Roman's post about the printit object.
As a side note, judging with the discussion which started a not so long time ago from Vade's post, the symbol/list difference is not necessarily an obvious thing. I mean, at least, it was not for me, for sure. Thus, although I also think that one should avoid using 3d party externals when starting to learn Max, maybe an exception could be made with printit. Maybe it would help to get the differences between various data type needed to work with in Max. Or maybe not. Just my experience.
Best,
Julien.
On 6/4/07, jln wrote:
>
>
> Quote: sambient wrote on Mon, 04 June 2007 19:21
> ----------------------------------------------------
> > Alexander,
> >
> > No offense taken but where did I say anything about 3rd party externals
> in
> > this thread? Unless "symbol" is an external.
>
>
> I think he was referring to Roman's post about the printit object.
>
> As a side note, judging with the discussion which started a not so long
> time ago from Vade's post, the symbol/list difference is not necessarily an
> obvious thing. I mean, at least, it was not for me, for sure. Thus, although
> I also think that one should avoid using 3d party externals when starting to
> learn Max, maybe an exception could be made with printit. Maybe it would
> help to get the differences between various data type needed to work with in
> Max. Or maybe not. Just my experience.
>
> Best,
> Julien.
>
Okay, cool. I think what threw me is that initially and still primarily
working with the Tutorials manual. I don't believe symbol was mentioned in
the ones I've worked on and I've stopped at the more advanced stuff to take
stock of what's been thrown at me so far. It was then I went with list of
objects in hand to the reference manual and found symbol under the "message"
section. While my intention was to have a good idea about all message uses
perhaps symbol is a bit further down the road for me anyhow.
Stuart
I have to say this is one of max's glaring weaknesses in my opinion,
especially string handling. Symbols are a very strange thing, lists,
imo, even stranger as objects are not consistent with how certain
datatypes are handled, or even interpreted. Disambiguation of all of
this would be really nice in Max 5.
Anyway :)
On Jun 4, 2007, at 1:51 PM, jln wrote:
> As a side note, judging with the discussion which started a not so
> long time ago from Vade's post, the symbol/list difference is not
> necessarily an obvious thing. I mean, at least, it was not for me,
> for sure. Thus, although I also think that one should avoid using
> 3d party externals when starting to learn Max, maybe an exception
> could be made with printit. Maybe it would help to get the
> differences between various data type needed to work with in Max.
> Or maybe not. Just my experience.
>
> Best,
> Julien.
v a d e //
www.vade.info
abstrakt.vade.info
Dark Ambient schrieb:
> Alexander,
>
> No offense taken but where did I say anything about 3rd party externals
> in this thread? Unless "symbol" is an external.
Alexander:
As you see, it is essential to quote, to offend the correct person...
And in case of printit, I'd recommend it as well, because there is
neither an alternative nor would it be used in a finished patch, its
sole purpose is debuggin'....
It doesn't help in this case too much though, one could argue that print
has a bug, because it rejects a [symbol 440] as such.
But to get back to the original question: the usual way to convert a
number into a symbol would be accomplished by [tosymbol], wich would
create "440" as output.
The word symbol is just a message, which would be interpreted by a
symbol method in a given object. This is not necessarily consistent
between objects...
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
the whole thing is getting really interesting when you want to strip off only a certain part of a path called
"myHD: list folder: my cool list.pdf"
and then store it in a coll to check for duplicates later.
those are the moments where you can sometimes see computer keyboards getting kicked out of a window in a penthouse apartment near frankfurt germany.
-110
Roman Thilenius schrieb:
> "symbol 1" is a symbol
The confusion came up because "symbol 1" is a message symbol with bad
arguments...
That means it is not a symbol, and probably an inconsistency because of
the lausy typing of the underlying c programming language.
It might even be a bug of print...
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com
Quote: vade wrote on Mon, 04 June 2007 20:32
----------------------------------------------------
> I have to say this is one of max's glaring weaknesses in my opinion,
> especially string handling. Symbols are a very strange thing, lists,
> imo, even stranger as objects are not consistent with how certain
> datatypes are handled, or even interpreted. Disambiguation of all of
> this would be really nice in Max 5.
----------------------------------------------------
This is really a documentation issue more than an implementation issue. And the biggest complication is that some objects are a little idiosyncratic in how they handle symbols.
A symbol is anything that can't naturally be interpreted as a number (or a comma or semicolon or dollar or the other exceptional characteres). Normally you just type 'supercalifragilisticexpialidocious' (or whatever) into a message box and that's it.
However, a few objects that deal with symbols, for obscure technical implementation reasons, need to be told that a symbol is a symbol, otherwise they barf. It is for the benefit of those objects that we sometimes need to write 'symbol supercalifragilisticexpialidocious' instead of simply writing 'supercalifragilisticexpialidocious'. This is admittedly a pain, but changing that behavior now is likely to break almost every patch in existence, which--believe me--would be a far greater cause of universal discomfort. The current situation is dental hygiene, the major change would be root canal work on all molars and wisdom teeth.
Be careful what you wish for. (Seems to be my mantra du jour.)
Root canals can be quite useful, as can spring cleaning. Id prefer a
clean implementation in Max 5, and keep 4 and its brethren ..... in
the past. backwards compat is not always the best thing, especially
if its over a very confusing and oft brought up subject. While id
like to have compatibility, id prefer to look to the future than stay
in the past.
Just because something is designed in a particular way doesnt mean
you have to live with it for the rest of your life.
On Jun 13, 2007, at 2:53 PM, Peter Castine wrote:
>
> Quote: vade wrote on Mon, 04 June 2007 20:32
> ----------------------------------------------------
>> I have to say this is one of max's glaring weaknesses in my opinion,
>> especially string handling. Symbols are a very strange thing, lists,
>> imo, even stranger as objects are not consistent with how certain
>> datatypes are handled, or even interpreted. Disambiguation of all of
>> this would be really nice in Max 5.
> ----------------------------------------------------
>
> This is really a documentation issue more than an implementation
> issue. And the biggest complication is that some objects are a
> little idiosyncratic in how they handle symbols.
>
> A symbol is anything that can't naturally be interpreted as a
> number (or a comma or semicolon or dollar or the other exceptional
> characteres). Normally you just type
> 'supercalifragilisticexpialidocious' (or whatever) into a message
> box and that's it.
>
> However, a few objects that deal with symbols, for obscure
> technical implementation reasons, need to be told that a symbol is
> a symbol, otherwise they barf. It is for the benefit of those
> objects that we sometimes need to write 'symbol
> supercalifragilisticexpialidocious' instead of simply writing
> 'supercalifragilisticexpialidocious'. This is admittedly a pain,
> but changing that behavior now is likely to break almost every
> patch in existence, which--believe me--would be a far greater cause
> of universal discomfort. The current situation is dental hygiene,
> the major change would be root canal work on all molars and wisdom
> teeth.
>
> Be careful what you wish for. (Seems to be my mantra du jour.)
> --
> -------------- http://www.bek.no/~pcastine/Litter/ -------------
> Peter Castine +--> Litter Power & Litter Bundle for Jitter
>
> iCE: Sequencing, Recording & Interface Building for Max/MSP
> Extremely cool http://www.dspaudio.com/
>
v a d e //
www.vade.info
abstrakt.vade.info
Quote: Stefan Tiedje wrote on Mon, 11 June 2007 12:35
----------------------------------------------------
> Roman Thilenius schrieb:
> > "symbol 1" is a symbol
>
> The confusion came up because "symbol 1" is a message symbol with bad
> arguments...
>
> That means it is not a symbol, and probably an inconsistency because of
> the lausy typing of the underlying c programming language.
>
> It might even be a bug of print...
well not a "bug" of [print], but a problem when using [print] to see max messages, in the console window things simply look different than they do in a messagebox in a patcher.
with printit and print both connected in your patch one can learn the difference between what you see and "real" max messages very good IMO.
(as he said: he did not find enough info about symbols in the max manual.)
Did you guys already consider this effect of the way string/message handling is currently implemented?
Mattijs
Quote: vade wrote on Thu, 14 June 2007 02:01
----------------------------------------------------
> Root canals can be quite useful, as can spring cleaning.
Glad you enjoy them.-
> Id prefer a
> clean implementation in Max 5, and keep 4 and its brethren ..... in
> the past. backwards compat is not always the best thing, especially
> if its over a very confusing and oft brought up subject.
----------------------------------------------------
Can I take that as an offer to re-implement every patch Stephan, Nick, Corte and I have ever written when your wishlist becomes reality?
Seriously: Backwards-compatibility is a tough master, and sometimes it can be revolted against successfully. However, the typical cycle is as something like the following:
- Year 0: Convention A introduced
- Years 1-3: Convention A proves to be sub-optimal
- Year 4: Convention B introduced as an *alternative* to Convention A. Convention A declared "deprecated"
- Year 6: Convention A is still deprecated, but the system developers have, for better or worse, done something that makes Conv. A suck even worse than it originally did. But it still works.
- Year 8 or so: Convention A gone for good.
I've seen this sort of cycle with Mac OS, FORTRAN, and several other systems. All of them are still with us, although evolved enormously from the original versions.
I've also seen systems that have gone for a "we're going to change this now and the hell with BC." They have all gone the way of the dodo. Think Betamax. Think dBase. I'd rather not add Max/MSP to this list.
What was it that Frank Zappa used to say?