[PD] Data structures - delete specific scalar?

Ingo Stock mail at ingostock.de
Sat May 19 17:00:41 CEST 2018


On 05/19/2018 11:56 AM, Roman Haefeli wrote:
> Yeah. It's not very elegant and gets expensive pretty quickly. I was
> wondering about alternative strategies, like moving non-used scalars
> out-of-the-way and later re-use them. It's cumbersome to implement, but
> probably less drastic than the clear-all-and-rebuild method. 
Can only answer to this: There are several methods to make scalars
invisible. Anyhow, in my experience the method to clear the subpatch and
recreate everything works quite well and is imho the clean approach to
do it, as all the scalars are redrawn every frame any way.

There are other limits to the use of data structures. Depending on your
computer, when you get above 800 scalars or so, the patch becomes laggy.

Consider the attached patch: On load 1050 scalars are created, which is
already quite heavy on my computer. Anyhow, deleting a scalar by
clicking on it works fine, using the clear and redraw method.

Hiding scalars by making them invisible doesn't help with the lagging
problem. Therefore i would recommend the clear and redraw method any day. ;)

best wishes, ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scalar-delete-demo.pd
Type: text/x-pd-l2ork
Size: 3573 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180519/b0a969f8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180519/b0a969f8/attachment.sig>


More information about the Pd-list mailing list