[PD] static array/text

Liam Goodacre liamg_uw at hotmail.com
Mon May 7 09:59:16 CEST 2018


I have a similar solution in Context, and I rely on it so much that I have created abstractions to take care of it See the files [share] and [shared] here<https://github.com/LGoodacre/context-sequencer/tree/master/ctxfiles>. These objects are not documented, but I would be willing to explain them if it would help.
________________________________
From: Pd-list <pd-list-bounces at lists.iem.at> on behalf of Roman Haefeli <reduzent at gmail.com>
Sent: 07 May 2018 08:08
To: pd-list at lists.iem.at
Subject: Re: [PD] static array/text

On Mon, 2018-05-07 at 00:02 +0200, Dan Wilcox wrote:
> Is there one way to define a "static" table or text data that can be
> shared among abstractions? I have a few abstractions which use lookup
> tables and I realize now that they are basically creating a copy with
> each instance when they could really share the same data directly. I
> suppose this would be somewhat related to [value].

Sounds like that this is such a common pattern that it would deserve a
built-in solution.

In netpd, abstractions/instruments can call/create a [unpatch-singleton
<some_container>] whereas <some_container> is an arbitrary abstraction
holding a look-up table or similar that should be only instantiated
once. [unpatch-singleton] creates exactly one copy of <some_container>
and it creates it in a subpatch of  the unpatch instrument manager.
This way <some_container> persists for the whole session even if the
instrument that initially created it is closed.

https://github.com/reduzent/netpd

Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180507/2d6dd067/attachment-0001.html>


More information about the Pd-list mailing list