Subpatch custom arguments/attributes

Attila Novák's icon

I'm trying to create a subpatch which has an input bang and then which (after other things) display a random number. The "simple" random thing is not enough so thats why the subpatch just for clarification, but thats not really the topic.

How can I use arguments/attributes/etc to set a number from outside of the subpatch?

The problem is, that I can set this number as an inlet, but I get too many inlets in my main patch... Ideally it would be an attribute parameter in the inspector or something like that, but so far I was not lucky.

Tried using $1 or #1 kind of things but I don't get how they're supposed to work.

Thanks for helping

double_UG's icon

look at the object "patcherargs"

Max Patch
Copy patch and select New From Clipboard in Max.

Attila Novák's icon

Thanks, this helped a lot!

James Curran's icon

+1 Super helpful

Roman Thilenius's icon


patcherargs is basically

[loadbang]
[t #1]


you can also just write things like

[+ #1]

but watch out, there are a few objects which do not support that.


Livingston's icon

Thank you very much!