[PD-dev] Fwd: external help, please
Alexandre Torres Porres
porres at gmail.com
Thu Feb 22 18:38:24 CET 2018
Hi folks, I need help on an external. I wanna perform a task on an array of
signal inputs. It's a multichannel object, and I define the number of
channels with an argument.
Here's just the core of it, as an object named "mtx~", where I map the
input to the output. And this is what happens.
[image: Imagem inline 1]
So you see I get a weird mirrored output, instead of something like "1 2 3
4 5 6".
The perform method in the code is just
static t_int *mtx_perform(t_int *w){
t_mtx *x = (t_mtx *)(w[1]);
int nblock = (int)(w[2]);
t_float **in_vectors = x->x_in_vectors;
t_float **out_vectors = x->x_out_vectors;
t_int i;
for(i = 0; i < x->x_ch; i++){
t_float *in = in_vectors[i];
t_float *out = out_vectors[i];
t_int n = nblock;
while(n--)
*out++ = *in++;
}
return (w + 3);
}
What am I doing wrong? How should this go? See attached the help test
example and code.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180222/67d507c2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2018-02-21 at 19.51.19.png
Type: image/png
Size: 71270 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180222/67d507c2/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 61 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180222/67d507c2/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.pdlibbuilder
Type: application/octet-stream
Size: 40133 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180222/67d507c2/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtx~-test.pd
Type: application/octet-stream
Size: 2697 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180222/67d507c2/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtx~.c
Type: text/x-csrc
Size: 1882 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180222/67d507c2/attachment-0001.c>
More information about the Pd-dev
mailing list