<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-05-09 18:56 GMT-03:00 Christof Ressi <span dir="ltr"><<a href="mailto:christof.ressi@gmx.at" target="_blank">christof.ressi@gmx.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Pd internally adds 64 samples to the delay time you specify for [delwrite~], so the user will think that buffer size = max. delay time. Here's the relevant part of the code:<br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
static void sigdelwrite_updatesr (t_sigdelwrite *x, t_float sr) /* added by Mathieu Bouchard */<br>
{<br>
    int nsamps = x->x_deltime * sr * (t_float)(0.001f);<br>
    if (nsamps < 1) nsamps = 1;<br>
    nsamps += ((- nsamps) & (SAMPBLK - 1));<br>
    nsamps += DEFDELVS;<br>
    ...<br>
}<br>
<br>
where DEFDELVS is defined as 64.<br>
<br>
Of course this only works for block sizes of 64 samples. </blockquote><div><br></div><div>this is from the new 0.47 version, right? </div><div><br></div><div>For me, the only sensible solution is that it knows about the block size and works it out for the user. Having the user to deal with this is just a bad design choice.</div><div><br></div><div>> Not so easy I guess</div><div><br></div><div>But definitely better once worked out.</div><div><br></div><div>> the block size of any reading object can change dynamically - should</div><div>>  that always trigger a reallocation of the delay line? Probably not...<br>
<br>You're basically looking at a buffer resize, which I don't think is hard, just add or remove samples...</div><div><br></div><div>by the way, resseting the delay length as a message would be another feature request I'd be intersted in, besides the clear method.<br><br>> [delwrite~] already somehow cares for overlap and oversampling (...).</div><div>> But I don't know if it's only when DSP is turned on. </div><div><br></div><div>No, whenever you change the overlap, [delwrite~]  will change its size in samples. The patch I sent shows this - so it just adds or removes samples</div><div><br></div><div>> it's basically a design question</div><div><br></div><div>yep. By thinking about it, I guess the sensible thing to do is only care about the block size of where the [delwrite~] is in. Just make it clear in the documentation that a [delread~]/[delread4~] object won't work well if it has a bigger block size.</div><div><br></div><div>> <span style="font-size:12.8px">I personally like it when everything is as transparent as possible.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">me too :)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">cheers</span></div></div></div></div>