[PD] passing $0 from an abstraction to another abstraction

patrice colet colet.patrice at free.fr
Wed Dec 10 00:26:36 CET 2014


Le 10/12/2014 00:03, i go bananas a écrit :
> Loadbang doesn't trigger when you create abstractions dynamically.
>
> Use [initbang], or send a message after creating the abstraction to 
> trigger the loadbang.  (Look up pd-msg in the help docs)
>

It should be actually possible to trigger [loadbang] in abstraction by 
sending [loadbang( message to abstraction

> On Wednesday, December 10, 2014, Alexandros Drymonitis 
> <adrcki at gmail.com <mailto:adrcki at gmail.com>> wrote:
>
>     I'm creating an abstraction (say it's called test-parent.pd) which
>     creates another abstraction (called test-child.pd) inside a
>     subpatch, a number of times according to the argument passed to
>     test-parent.pd.
>     What I want to do is store $0 of test-parent.pd and pass it to all
>     instances of test-child.pd to set a name for [throw~] which is in
>     the test-child abstraction, like this (this is in test-parent.pd):
>
>     [loop] <- this is an until loop with a counter
>     |
>     [t   f    b]
>     |         |
>     [* 20] [$0]
>     |         |
>     |         |
>     [pack f f]
>     |
>     [obj 100 $1 test-child $2(
>     |
>     [s subpatch]
>
>     Inside test-child.pd I have this:
>
>     [loadbang]
>     |
>     [$1 ]
>     |
>     [set $1-sum(
>     |
>     [throw~]
>
>     Say that $0 of test parent is 1004. What happens is that, even
>     though all test-child.pd abstractions are created like this
>     [test-child 1004], I get the following error: throw~ 1127-sum: no
>     matching catch
>     There is a [catch~ $0-sum] in test-parent.pd, which, I guess, is
>     updated accoridng to $0, but [test-child] seems to have been stuck
>     to 1127 (I'm clearing the subpatch where all [test-child]s are
>     being created, and then create the abstractions)...
>     Any clues?
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20141210/b475987b/attachment.html>


More information about the Pd-list mailing list