Thanks Pierre. Trying it now.

This thing doesn't immediately crash or segfault, so I'm onto a winner eventually :)

I understand my brain is slightly more dead than it was. But we can move forward now.
Cheers,
Ed
 
Lone Shark releases: 
Light Vessel Automatic available now on 12" vinyl.
Build Your Wings on the Way Down, the new digital album available @ http://scifirecords.co.uk/releases
Earthlings compilation is out now @ http://www.pyramidtransmissions.com

Ninja Jamm - the revolutionary music remix app for iOS and Android: http://www.ninjajamm.com/

Gemnotes-0.2: Live music notation for Pure Data, and Metastudio 5 live composition and improvisation suite, available at http://sharktracks.co.uk/puredata


On Thursday, 29 September 2016, 12:27, Pierre Guillot <guillotpierre6@gmail.com> wrote:


Hi Ed,
The prototype of your perform method is wrong. You should have something like:
static t_int *wrap_overshoot_tilde_perform( t_int *w)
{
    t_wrap_overshoot_tilde *x = (t_wrap_overshoot_tilde *)(w[1]);
    t_sample *in  = (t_sample *)(w[2]);
    t_sample *out = (t_sample *)(w[3]);
    t_int n       = (t_int)(w[4]);
    ...
    return w+5;
}

and the dsp_add method should be called like this:
dsp_add((t_perfroutine)wrap_ overshoot_tilde_perform, 4, (t_int)x, (t_int)sp[0]->s_vec, (t_int)sp[1]->s_vec, (t_int)sp[0]->s_n);

About what you want to do, I would like to help but I'm not sure to understand. I understand that you want that your object performs at the end of the DSP chain (end of the audio block) on a signal that should be computed previously in the DSP chain but as we all know only the Matthew McConaughey from Interstellar has this power :).

Cheers,

Pierre

2016-09-29 12:00 GMT+02:00 Ed Kelly via Pd-dev <pd-dev@lists.iem.at>:
Hey list,
I'm tearing my hair out trying to re-write the wrap~ object, so that it doesn't wrap instantly but waits until the end of the audio block to wrap~ the signal. I hope you understand.

This is so that control-rate messages sent to another object further down the signal-path have a chance to catch up, and eliminate clicks due to the end-of-block delay for control messages.

The idea is that wrap_overshoot~ will not wrap until the end of the block. This is a really tech-y problem, but I've tried variables and clocks. Everything seems to segfault on me.

?????
Lots of love,
Ed

PS if this works you'll all be able to use it during and after pdcon16~

______________________________ _________________
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/ listinfo/pd-dev