Hi guys,
i'm making a subpatch but i don't know how work with parameter passed to the subpatch.
If i write $1, it takes the value of the first inlets!!!
Thank you for your advices!! Bye Robb
SubPatch: parameters
Hi guys,
i'm making a subpatch but i don't know how work with parameter passed to the subpatch.
If i write $1, it takes the value of the first inlets!!!
Thank you for your advices!! Bye Robb
HEy Robb
I think it only works with abstractions
copy the contents of the suppatch into a new canvas, save as mypatch.pd into the same folder as your parent patch
then create it : [mypatch 20 400] or whatever value you want to pass
Is this helping?
boonier
yeah, i always wanted subpatches to be able to have creation arguments too, and never understood why they couldn't.
but actually there are lots of advantages to subpatches taking the creation arguments of the parent patch which i have discovered, and realised that it's probably quite well designed the way it is.
but i think an improvement would be that if a subpatch has creation arguments entered, then those would overwrite the arguments of the parent. but if no creation arguments are entered, then the subpatch would inherit those of the parent. not sure if anyone has mentioned this idea on the pd mailing list or if it would even be feasible.
for one,. i'd still like it if subpatches could take $0 arguments to make themselves unique.
anyway, a workaround is to put an inlet on the right side of the subpatch, followed by an upack for as many parameters as you need, and then send those parameters as a message from outside the patch.
I can't make an abstraction 'couse i need a subpatch.
It's really a very strange behaviour;so i can try to pass the parameter as a pack through the inlet and then send they using "s" box as you say.
But isn't it too much expensive for the CPU???
Thx 4 your answers..
you could probably make 1 million send/receive pairs and not overload your computer's cpu. don't worry.
Oops! Looks like something went wrong!