[PD] How to create abstraction without it popping up

Jonathan Wilkes jancsika at yahoo.com
Fri Mar 26 06:12:05 CET 2010



--- On Fri, 3/26/10, ailo <ailo.at at gmail.com> wrote:

> From: ailo <ailo.at at gmail.com>
> Subject: [PD] How to create abstraction without it popping up
> To: "pd list" <pd-list at iem.at>
> Date: Friday, March 26, 2010, 4:40 AM
> I'm doing a lot of dynamic creation
> of objects and came to a point where I would like to create
> objects with unique names.
> Unique names, because I want to create objects within these
> uniquely named objects.
> So, as far as I know, I can only achieve unique naming by
> creating an abstraction.
> But I don't want it to pop up, once created.
> I could of course send a vis 0 message to the abstraction
> right after it's creation, but that would lead to a lot fast
> popping, which I'd rather skip.
> 
> Any thoughts on this?

What your calling an abstraction Miller calls a "one-off subpatch."  This 
is:
[pd blah]

An abstraction is a separate pd file, which is created as an 
object in a patch.  One-off subpatches spring open as you describe-- 
unless you're doing dynamic patching, you typically want to start working 
inside the newly-created subpatch.  Abstractions don't do this (for 
obvious reasons).

I'm not sure why you need to dynamically instantiate several subpatches, 
but I suppose you could take advantage of abstractions in your case to 
avoid popups.  For example:

1) Make a new patch and save it as "container" in folder named "folder"
2) In patch "container" put a [namecanvas $1-c], save and close.
3) Make a new patch named "test" and save it in "folder"
4) Now in patch "test" do this:
[obj 20 20 container 1, obj 20 80 container 2(
|
[s pd-test.pd]
5) Now you've got two "container" objects, one with an argument of "1", 
and one with an argument of "2". To create objects inside [container 1], 
you can now take advantage of the [namecanvas] object you created earlier: 
[obj 20 20 osc~ 440(
|
[s 1-c] <- this goes to the first abstraction but not the second one.

Hope that helps.
-Jonathan


      





More information about the Pd-list mailing list