--- On Mon, 2/21/11, Frank Barknecht fbar@footils.org wrote:
From: Frank Barknecht fbar@footils.org Subject: Re: [PD] loadbang not sent for dynamically created objects? To: pd-list@iem.at Date: Monday, February 21, 2011, 9:50 AM On Sat, Feb 19, 2011 at 07:49:09PM +0000, Pedro Lopes wrote:
yes, this is known.
By known you mean.. Is it on the bug tracker already?
As Cyrille wrote, it's not a bug, but a feature: Usually when you use an abstraction in your patch and you load that patch, everything inside of that abstraction is loaded first, including its loadbangs, then the surrounding patch goes through its own loadbangs. Normally you don't recognize this, but the order becomes important, when the abstraction sends something to the surrounding patch for example through its outlet. Then the rule is: First the abstractions sends through the outlet, possibly influencing stuff in the main patch, then the main patch loadbangs. See the attachement "main.pd" for an illustration of this behaviour.
Now dynamic patching basically is the same as loading a patch: The messages are almost the same, only now they get sent to a [pd something] subpatch-receiver instead of to Pd's internal objectmaker. You can see this in the second example, main-dynamic.pd, whic just patches the contents of main.pd into a subpatch.
The important difference is the handling of loadbangs: If an abstraction like [lb-abs] would execute its loadbang immediatly, then it would bang to an outlet, that is not yet connected! So in the end your result would be different from the result you get when loading main.pd, although it's the same construction.
To overcome this ambiguity, loadbanging in dynamic patching is an explicit action: You have to initiate the loadbangs at an appropriate time that you decide on your own. Ususally it's fine to do that by sending a "loadbang" message at the end of your dynamic patching cycle, to the same receiver. This way also the execution order of the construct you've build will be preserved in execution of the loadbangs and initialisation.
When such things are discovered (and by things I mean
issues), shouldn't
they be documented inside the help patches?
There are no official help patches for dynamic patching, only the tutorial floating around somewhere, which I can't find ATM. The loadbang explanation should probably be inside of this, if it isn't already.
I think I need to add the term "official" to the (probably unofficial*) Pd glossary.
What does it mean? I.e., what information are you trying to convey by using it?
-Jonathan
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
-----Inline Attachment Follows-----
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list