[PD-dev] snake_in~ tutorial?

Alexandre Torres Porres porres at gmail.com
Sun Sep 10 20:41:29 CEST 2023


Check many of my mc aware objects in else. Snake uses a perform routine,
but a very simple one and you can also look for that copy function in the
code. There is no real difference and you just have to split the vector in
different chunks of block sizes to get different channels. Other vanilla
objects that are mc aware also do this



On Sun, 10 Sep 2023 at 15:17 Alexandros Drymonitis <adrcki at gmail.com> wrote:

> I want to experiment with the new Pd feature of the
> [snake_in~]/[snake_out~] objects, specifically with [snake_in~]. In Pd's
> source files (in d_misc.c) I read the following in [snake_in~]'s dsp
> routine:
>
> ```
> static void snake_in_tilde_dsp(t_snake_in *x, t_signal **sp)
> {
>      int i;
>          /* create an n-channel output signal. sp has n+1 elements. */
>      signal_setmultiout(&sp[x->x_nchans], x->x_nchans);
>          /* add n copy operations to the DSP chain, one from each input */
>      for (i = 0; i < x->x_nchans; i++)
>           dsp_add_copy(sp[i]->s_vec,
>              sp[x->x_nchans]->s_vec + i * sp[0]->s_length,
> sp[0]->s_length);
> }
>
> ```
>
> There is no perform routine, so my question is, how do I deal with snake
> signals in a perform routine? How do I unpack them? Where is this
> happening in Pd's source code, so I can have a look?
>
>
>
>
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20230910/10f38d07/attachment.htm>


More information about the Pd-dev mailing list