[PD] static array/text

Roman Haefeli reduzent at gmail.com
Mon May 7 09:08:05 CEST 2018

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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180507/10400535/attachment.sig>

More information about the Pd-list mailing list