[L2Ork-dev] GSoC 2020 - Encapsulation Ergonomics - Questions

Jonathan Wilkes jon.w.wilkes at gmail.com
Sat Mar 28 18:34:25 EDT 2020

On Sat, Mar 28, 2020 at 7:44 AM Guillem Bartrina Moreno
<guillembartrina at gmail.com> wrote:
> A few days ago I expressed my interest toward the Encapsulation Ergonomics idea for Purr Data. I have been doing some research and I have several questions related to the idea:
> What kind of behavior is expected for the automatic creation of inlets and outlets: create automatically the inlets and outlets when you paste a selection of objects anywhere, the same but only when you paste them inside a subpatch or adding a menu option/keyboard shortcut to automatically create a subpatch that encapsulates the current selection of objects and creates the inlets and outlets too?

Hi Guillem,

I'm not sure I understand the question. But the idea is that you start
with something like this:

[two] <-- this object is selected

Now when you trigger the auto subpatch feature, you'd get something like this:


And inside the [pd] subpatch would be:


Of course, you'll need to figure out how to deal with more complex
selections of objects.

> And what inlets and outlets must be created? The ones connected to some objects outside the current selection or all the free sockets of the selected objects?

I would guess the most useful behavior would be to connect the ones
currently connected to other objects.

> And related to the abstractions:
> If I understood it correctly the goal is to be able to store abstractions inside a patch file instead of in a separated .pd file. The abstraction will behave like a subpatch with the diffetrence that if you have multiple objects of that type, all of them will be internally the same and if you change the abstraction all objects of that kind will change too. Another interpretation would be to be able to automatically create an abstraction from a selection of objects and save it in a separated .pd file in the same directory as the current patch and then create an object with the same name (except the .pd) inside the patch.

Both would be welcome additions.

For the first, you can look at the behavior and implementation of
[declare] to get a sense of what would be involved.

Creating the abstraction from a selection of objects is similar to
subpatches with the added complexity of touching the file system.
can already do that by creating a new patch, pasting, and saving. But
it is a UX improvement to be able to create the abstraction directly
from a selection (plus I guess popping up the save dialog there). It's
also more discoverable for new users who might not know what the
current directory is for a newly created patch.

Let us know if you have any more questions.


> I look forward for your response. Thank you!
> --
> Guillem Bartrina Moreno
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev

More information about the L2Ork-dev mailing list