I recently implemented a variant of delread~ that can have it's delwrite~ set. Basically in the "set" message
I just did most of the things normally done in the dsp method. Instead of sending the pointer to the delwritectl to the perform
method using dsp_add, instead I send a pointer to a pointer to the delwritectl that is stored in the object dataspace.
That way, when a different delwrite is set I just have to store the pointer in the object dataspace and dereference it correctly
in the perform method:
you can see it in the .c files in this commit
https://github.com/sebshader/shadylib/commit/8bdf985aacb3979e776ad4e2487c451fadb9864a
-seb
-----Original Message-----
From: Alexandre Torres Porres <porres@gmail.com>
To: Christof Ressi <info@christofressi.com>
Cc: Pd-List <pd-list@lists.iem.at>
Sent: Mon, Mar 1, 2021 5:08 pm
Subject: Re: [PD] how to force the DSP call? / set delread~ delay name
Em seg., 1 de mar. de 2021 às 20:40, Alexandre Torres Porres <
porres@gmail.com> escreveu:
I give up already, waiting for you :)
Pd objects are (unfortunately) not notified on connection changes
and I can't think of a sane way to work around this. The real
solution would be to add an API for object state change
notifications. In the meantime, I would say: forget about it.
while we're at it, any reason why not to have a "set" method for [send~] and [catch~]? Seems inconsistent