What is the difference between arguments, messages and attributes?
And why do the types (int, float, list, setloop) bear no resemblance to types in modern programming languages?
I am looking at the groove~ documentation at the moment and trying to work out if I can make it loop from the loop start without starting from the start of the sample.
I started to drill into the docs and found it all very confusing/inconsistent.
Or am I just stupid?
for instance in the right click object help for groove~ it shows a -1 message going into a sig~ and saying that it makes it go backwards.
But I tried this and it doesn’t make it go bacwards at all!
-1 into sig only seems to make it go backwards when you start it with startloop (found this by error and trial).
not sure I understand the problem. The number going into sig~ determines the playback speed not loop start/stop. I agree though the references can be confusing until you get the hang of them.
----------begin_max5_patcher---------- 723.3ocyWssjhBCD8Y7qfhmcrBAD08s86XqslJBsXlERnRBtykZlu8MW.EGQ kYJWl4ACIcZRNmS5tC9xDuf07GAYf+O7+kum2KS77rlLF7ZF6ETRdLsfHstE TBRIIGBl5lSAOpr1uKr0TEQktkxxuW.oJ2RiwKmgl5Gt.YdDgmMWOPax+2Mu yFNSIoOCF2CwZmblY0kTVAnraM9fQdsp0ZXiUmI0SUfaKCB1u3zLKB4qe3N7 dTZ1QFoz5cvOETRQfYhWmLwzLcfpQJurDXpSTinKHFwIIVwHFaerxzhQePwH rWw.cJiCWMNLFeoi+jnwjwKGGFOj.9QhwKtsL9b43REuZ.A1MY4ty7uhr7vn aqdvf+pW1SkCZ9aWOF.ilePNtQw.mUNzPho4XuhB51JJvyYjzKx+jXCkiiBs Ol21tGbC3bumf8EeFvVP2AyxIT1d.uiH1qAmN64oCdoiHt76njqwmJhPuMJP bOvHqKfyenN+JGpS61y7aSAmnLcJnRUum4Is7QR1AY2STJAccsBNzS1HZMpl QWJpA9lVys16RjBNK+7Z2QtVynJo5IGsi6wgR8wjYtj1v+2MKkYl8NaIkSmm pWdS3qUm5jZcjSsJYeKfbKWn5iKNWsQYsOtQEQK37JcDfuDT1tXDB4GoazlT Dg03.tK0UjEiB+xpxFOJEYWWuYCHdyufmyKIoaexOcKH3+AfYD5lKHTQqb4q wKb50xaX8W74Dp8ojqIr79+BzQQ0xEb9NnipMfBaMBUXxmRnh9XB0I0z58Jq goU1WUm7xd++jwRVi8iEPIuVj1Bj1+Uf+A5lAREkQTTNqiSl6O63zVZVFv5d GUFUZJvagOp2ixghGy2ubc7LdvA8sBNweqPi9JV+vqflEG4y+azfF.ZFo.mA fljQSaFJZ9LZiqDDopZGHjMKoEH5p0OvE1uvYpcHk4FZWw.Ari15+7IlU60I +CPJphwr -----------end_max5_patcher-----------
An argument is some data entered into an object’s box after its name
A message is some data sent into an inlet
An attribute is a property set in the inspector.
General suggestions (from somebody who complains about this stuff all the time)
– The datatypes (afaik setloop is not a datatype, I think this is a message you send to groove~) are inherited from C/Lisp. They have not been updated since the dawn of Max to preserve compatibility. A number of "modern" languages still do strict static types, which is a pain in the ass as far as I’m concerned.
-Max is not a programming language. This fact still trips me up a lot more than I would like. The best way to think of it imo is as a bunch of DLLs and a thing to load them. The objects in and of themselves are "programs". In this way of thinking,
-Messages are inputs to a running program
-Arguments are commandline parameters
-Attributes are settings in a config file loaded when the program starts
Think of an OS and daemons/services. A daemon/service sits in ram and waits for some input. If the input is what it expects it does what you want, if the input is not what it expects it does something other than you want.
Do not be fooled by the fact that you can change these on the fly. This simply means that max "reloads" this stuff quick enough that you don’t notice.
Check out the tutorials. In particular, until you understand message structure and message wildcards ($whatever) your progress will probably be slow.
In the messages section there are things that seem to suggest the type of the message such as int and float (because sending these as literals surely does nothing useful).
But in this same messages section underneath the int and float we have setloop etc..
Which I would have thought are strings.
This is confusing – maybe it should have the heading – allowed values and leave off the int, float stuff.
And what does ‘anything’ mean in this context? You can put anything in there and it does something useful? Surely not.
Thanks for the distinction on the messages, arguments and attributes and also for the information on dlls versus language.
Are there any tutorials/documents on the design of the max/msp system?
For someone like me this would help – I didn’t know it wasn’t a programming language – messages make much more sense in this context!
This is straightforward. Int is a message consisting of nothing but an integer. Float is a message consisting of nothing but a float. setloop is a maessage consisting of the string "setloop" followed by two numbers.
Arguments to a message are anything following the message "name". Again, find the tutorial that talks about $ in messages – it’s one of the early ones.
Make a message that says setloop $1 $2. Connect a message with two ints to the setloop message’s left inlet and a blank message’s right inlet to setloop’s outlet. Ctrl+click the two int message. See what happens?
Anything containing more than 1 item (string, int, float, whatever) qualifies as a list.
In the context of "groove~", "anything" means that any symbol followed by 3 ints will be handled as a command to the transport. This enables patches to be more easily understood by allowing users to arbitrarily name cue points.
Yeah I know what ints and floats and lists are (in ‘normal’ programming) but in the context of the documentation what is the literal string ‘anything’ supposed to mean?
Why is the documentation structured like this?
Mixing up what seem to be data types with a type called ‘anything’ seems to be always contradictory.
Normally you say that the type of an input can be of some type to show the user of the object (dll, script, small program, applet call it what you will) that it will not accept a string in this place or that if you supply a float in the case of type int any decimals will be lost.
What the documentation seems to suggest to me as a professional computer programmer of more than 20 years is that if the type of the variable is ‘int’ then it surely cannot be ‘anything’!
Dude, seriously, they’re not datatypes. They’re inputs. Your email daemon does not recognize datatypes. It doesn’t care if your email address is composed of letters, numbers, or ancient egyptian heiroglyphics. It looks at the address, parses it to the best of its ability and tries to use it to deliver the message. If it fails, it says so. Same with your dns. Sure, it needs some help to go from a numerical ip to an alphanumerical url, but _even if it doesn’t get that help_ it doesn’t complain of a type miscast, it simply says "I couldn’t resolve this URL/IP" and continues to go about its business, waiting for a url or IP it actually can resolve.
The helpfile explains the inputs that groove~ will handle, and how it will handle them. In some cases, the inputs are consistent with generally-recognized datatypes. In others, they consist of a symbol (alphanumeric string), specified in the helpfile (such as setloop), followed by some other stuff (arguments). Therefore a valid setloop input may look like "setloop 1 2".
Your programming experience is only mildly useful here. If you truly cannot progress without understanding this from a programming perspective, download the max sdk. It contains c code for everything. However, I would strongly urge you to go through the tutorials first.
Yes, but that will take maybe longer :). IMO it’s probably better that he understand the Max nature first :).
I went through a lot of the tutorials – not difficult to understand and are quite useful.
All I am saying is that the documentation imo is confusing.
That’s my opinion – probably because of what I do – other people don’t seem to complain so much.
Again in my opinion I would prefer not to see words like int and float mixed with words like anything because of their historic significance for programmers.
Anyway, it seems I am very much in the minority – so I will shut up and just get lost.
halsallian, Dont get me wrong, I have a lot of the same problems you do (strict static typing in particular) but I would disagree with you on this. If something in my computer is called a "tree" I will not complain because it is not brown with green leaves on it. Simply because some messages share names with datatypes does not mean that the entire system works in a datatype paradigm. Some of it does, and some of it doesn’t.
I think it’s depend on what "Max Object" that you’re working with.
and don’t thinking "int,float,list,etc.." was datatype but thinking all of them act like name of "function,method,property" then i think you get & clear all of them .
I know I said I was bowing out but if the meaning of the documentation depends on the object that’s a worry!
it does not, you’re likely to meet again that mysterious "anything" elsewhere in the documentation
Nope, the meanings of all the terms are consistent, even between messages and objects. An argument is always an argument. A property is always a property. A message is always a message.
"Anything" is a wildcard. Messages are never typed. Their contents are, but not the "containers".
The more you cling to programming paradigms, the more painful the transition will be for you. This is not coding, this is sysadmin. Somewhere between connecting stuff together you maybe write some code, but mostly you simply make sure that everything is talking to each other correctly, changing config files, and routing data.
are you sure the meanings of all terms are consistent?
have I found perfection at last?
Sure, only not between programming and Max :).
anything is like object,id ….. you can custom cast to whatever you want
Forums > MaxMSP