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.

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