Jiri Heitlager wrote:
Hello,
i am building a project that uses several audio channels. That is all working well. No I have one question. I have build one channel and put that into a patch [pd channel] Each [pd channel] holds a [dac~ n]. If I
a [pd] is NOT a patch but a sub-patch. it's only purpose is to make your code more readable by hiding stuff (well, not entirely true when it comes to datastructures, but ignore this for now), and NOT for re-using code. for this you have to make _abstraction_s. an "abstraction" is a pd patch saved to disk.
e.g. create a new patch ("Ctrl-N"), copy the channel-code in there, and save it as "channel.pd". now you can create objects [channel], each holding one instance of the channel-code.
of course you will have to parametrize your abstraction by use of arguments (dollargs): use [dac~ $1] within the channel.pd and call it as [channel 5] which will magically address the [dac~ 5] within this instance.
this is certainly described within the documentation that comes with pd (e.g. doc/2.control.examples/12.PART2.subpath.pd)
mfg.asdr. IOhannes