Using messages to assign arguments
Hello,
I have a feeling there is a simple solution for this, I just can't find it.
I would like to change the arguments of my abstract object (with 3 pound sign arguments) via a message. I know max 5 allows you to change attributes via the @ message, but I don't see a section for arguments.
I see that poly~ has the option for an 'args' message and bpatcher also has an attribute called arguments, but what if I want to use a normal patcher object?
Does anyone have any suggestions?
Thanks
I would also like to know if there is a simple solution to this. I've always just used scripting to solve problems like this. One trick is to create a parent patch that will generate one copy of your subpatch using scripting. Then, any time you want to change one of the arguments, you just use a script to delete the subpatch and generate a new one. Of course, one problem with this is that there will be a brief moment where the subpatch isn't there, so obviously you couldn't do this while it is processing audio, etc., but for most purposes it should be fine.
not sure if this is what you mean, but what about ??
Thanks for the advice.
As far as I understand patcherargs allows you to get the patcher arguments but not send them. I want to be able to add, remove and reassign different arguments to my patcher.
Scripting seems like a viable option, but it would be nice if normal objects included an attribute for arguments. There are times when I can't afford a break in time while the script does its stuff.
It seems silly to have to use a bpathcer for one single object but that may be the only way to change args on the fly without scripting.
Dear max development team, please put arguments in attributes in your next release.
Thanks.
Which objects are using the arguments? Is there a reason why it's not possible just to connect inlets or receive objects to the objects in question? I guess the only times I've run into this problem are when I'm using nested subpatches in which one is using a #1 or whatever to set the value of a subpatch within it so that the subpatch "inherits" the argument from its parent. For example, PatchA contains an "int #1", and PatchB contains an object with the text "PatchA #1". When PatchB is called up with something like "PatchB 3", the int in Patch a becomes "int 3". I'm trying to think of another instance where you wouldn't be able to change values the usual way, and at the moment I can't think of any (doesn't mean there aren't any). Have you tried working around it using sends/receives with #0?
m_wadde schrieb:
> Scripting seems like a viable option, but it would be nice if normal
> objects included an attribute for arguments. There are times when I
> can't afford a break in time while the script does its stuff.
Almost all max objects have a message for arguments you type in. Only
exceptions are arguments which require a reintatiation, like the fft
size for a pfft.
If you make your own abstractions, just take care of it. Mine usually
have a [route arg1 arg2 etc...] connected to the first inlet. To use
scripting as "solution" doesn't make sense for me at all...
Stefan
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com