Changeable Arguments ($1, $1i, #1) for Objects
New to Max; trying to find a way to use the changeable argument function for objects such as pensize. Everytime I try anything it just prints the output as $1 or whatever was written in the object.
According to Docs, this is supposed to be possible within a subpath, and using the #. However I tried this and had the same problem. Anyone have any ideas?
Hi Mwanzi,
I don't fully understand what you are trying to do but!
$1 ($2, $3... etc)is used in messages, and and will be replaced by the 1st atom of the incoming list (if its not a list it will just use that one value), the $2 will be replaced by the second atom of the incoming list, if it exists else it will just output "0", and so on. You can't have anything stuck in the $1 from the front, but its ok from the back i.e. sending something to a "$1stuff" messagebox will work, but not at "something$1".
The $i1 $f1 are used in expression objects like [if] and [expr]. The number indicating the inlet and the "i" or "f' indicating that the input will be treated as an integer or float respectively.
The #1, is used in abstractions and bpatchers, not subpatches.
If you create a patch to use it as an abstraction, every #1 you set, will be replaced by the first argument you use when creating an object with your abstraction e.g. making a patch named "myAbst", saving it in some path that max looks at (you can add paths from "Options->File Preferences"), and then creating and object in another patcher like [myAbst 123], will replace the #1 of that patch's instance with 123.
Sorry if I'm not that clear with the examples, if you post an example it might be easier to figure out the problem you have.
Cheers!
-N
"pensize" is obviously not an object but a command for [lcd], which you are writing into a [message] object.
using $1 is right, but please in a mesagebox and not in an objectbox.
if you type it in an objectbox it makes the whole thing a [list] object. :)