[PD] adding outlets to [inlet~] (was How can a signal inlet of an object know if it's receiving a signal)

Alexandre Torres Porres porres at gmail.com
Thu Mar 8 00:39:35 CET 2018


oh, and if someone out there would like to collaborate with me in an
external, for easy prototyping, we could start with the current inlet~
structure as a model, but like I said, I couldn't get there, so if anyone
succeeds and can send me the code, we could have some fun more easily

cheers

2018-03-07 20:35 GMT-03:00 Alexandre Torres Porres <porres at gmail.com>:

> Ok, the thread was digressing, so I opened a new one... There's a
> suggestion to add outlets to inlet~ in: https://github.com/pure-data/p
> ure-data/issues/259 One of the outlets would report if a signal is
> connected or not (as discussed in the previous thread), the other would
> route control messages.
>
> I got this itch to try and make a Pull Request for it. First I tried to
> make it as an external, but couldn't really do it. I tried copying the code
> of inlet into a new external, without any changes, but I seem to have
> failed miserably at it.
>
> So I went ahead and started editing Pd's code to see what would happen and
> if I could do a Pull Request. It was easier to do that, and I was
> apparently on the right track. So I first added a new control outlet to
> pass/route all control data fed into an [inlet~] object.
>
> The problem now is that inlet~ still only accepts signals, and will print
> an error like inlet: expected 'signal' but got 'bang' ... so now what? I
> figure it'd be crazy to change Pd's code elsewhere, so I looked at it and I
> assume that this is being set here.
>
> static void *vinlet_newsig(t_symbol *s)
>
> {
>
>     t_vinlet *x = (t_vinlet *)pd_new(vinlet_class);
>
>     x->x_canvas = canvas_getcurrent();
>
>     x->x_inlet = canvas_addinlet(x->x_canvas, &x->x_obj.ob_pd, &s_signal);
>
> Am I right? So I ask, how can I make this external accept ANY kind of
> message, not just signals?
>
> thanks
>
> 2018-03-07 16:24 GMT-03:00 Alexandre Torres Porres <porres at gmail.com>:
>
>>
>>
>> 2018-03-07 15:42 GMT-03:00 Alexandre Torres Porres <porres at gmail.com>:
>>
>>> by the way, here's an issue on github
>>>
>>> https://github.com/pure-data/pure-data/issues/259
>>>
>>
>> which had been posted on this thread already, haha, sorry
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180307/9f055404/attachment.html>


More information about the Pd-list mailing list