Hi,
Sorry for being a bit lazy, but how do you make abstractions (or even just subpatches?) that accept arguments, i.e [my_abs 10 12 42].
Cheers
Abstraction with arguments
Hi,
Sorry for being a bit lazy, but how do you make abstractions (or even just subpatches?) that accept arguments, i.e [my_abs 10 12 42].
Cheers
Creation arguments are available via $1, $2, $3 etc inside the abstraction. Subpatches don't take arguments, but the ones from the parent patch are available.
See: http://write.flossmanuals.net/pure-data/dollar-signs/ for reference
thanks @bocanegra & @ingox
cry$1al clear
@cfry You can also use [pdcontrol], it allows you to parse the arguments and put them where you want them.
array-set.pd
This parses the arguments in the same way as the array objects, so you can do [abstraction arrayname f f], [abstraction f f], [abstraction f] or just [abstraction] and it gets everything where it should go without errors caused by a float being were a symbol should be.
Edit: made it a more complete example
Oops! Looks like something went wrong!