<div dir="ltr">yeah, the spectral delay deal I already have an example patch that works, but for this other patch I'm working on, I really need the delay time to fall in between hop sizes, so I just can't really do it then, and I think I understand why now.<div><br></div><div>thanks</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sáb, 3 de ago de 2019 às 19:43, Christof Ressi <<a href="mailto:christof.ressi@gmx.at">christof.ressi@gmx.at</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Verdana;font-size:12px"><div>
<div>Hi,</div>

<div> </div>

<div>when you have a [delwrite~] in a subpatch with overlap, you have to make sure that the delay time for [delread~] is rounded down to the hopsize in ms, otherwise you will read parts of two non-consecutive blocks of audio and get glitchy results. Here's what happens:</div>

<div> </div>

<div>[block~ 8 4] // for the sake of simplicity</div>

<div> </div>

<div>blocksize: 8, overlap: 4, hopsize: 2</div>

<div> </div>

<div>input signal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15</div>

<div> </div>

<div>[delwrite~] fills the delay line for every window:</div>

<div> </div>

<div>window1: 0, 1, 2, 3, 4, 5, 6, 7</div>

<div>window2: 2, 3, 4, 5, 6, 7, 8, 9</div>

<div>window3: 4, 5, 6, 7, 8, 9, 10, 11</div>

<div>window4: 6, 7, 8, 9, 10, 11, 12, 13</div>

<div> </div>

<div>after 8 samples of input, the delay line will actually contain 8 * 4 = 32 samples:</div>

<div> </div>

<div>0, 1, 2, 3, 4, 5, 6, 7 | 2, 3, 4, 5, 6, 7, 8, 9 | 4, 5, 6, 7, 8, 9, 10, 11 | 6, 7, 8, 9, 10, 11, 12, 13</div>

<div> </div>

<div>as you can see, the delay time *in samples* for [delread~] must be a multiple of 8 (= blocksize) to avoid discontinuities. when [delread~] converts from ms to samples, it takes the overlap into account, so you can use a multiple of the *hopsize in ms*.</div>

<div> </div>

<div>As you might have noticed, with 4x overlap the delay line needs 4x more space than usual. Luckily, [delwrite~] also accounts for the overlap when resizing the delay line, so for 4x overlap [delwrite~ 1000] will actually allocate 1000 * 44.1 * 4 = 176,400 samples (+ a few extra samples).</div>

<div> </div>

<div>Attached you'll find a modified version of your test patch with the glitches removed and an example for a spectral delay. Enjoy!</div>

<div> </div>

<div>Christof</div>

<div> 
<div style="margin:10px 5px 5px 10px;padding:10px 0px 10px 10px;border-left:2px solid rgb(195,217,229)">
<div style="margin:0px 0px 10px"><b>Gesendet:</b> Freitag, 02. August 2019 um 07:46 Uhr<br>
<b>Von:</b> "Alexandre Torres Porres" <<a href="mailto:porres@gmail.com" target="_blank">porres@gmail.com</a>><br>
<b>An:</b> Pd-List <<a href="mailto:pd-list@lists.iem.at" target="_blank">pd-list@lists.iem.at</a>><br>
<b>Betreff:</b> [PD] delay with fft / block size with overlap</div>

<div>
<div>Hi, I'm trying to make sense of how delread/delwrite work in a fft subpatch.
<div> </div>

<div>So, I have attached a test patch, why does it sound so bad? All I'm trying to do here is delay the sound input before it gets analyzed/ressynthesized. This is not my ultimate goal so I don't really need to do what I'm doing here, but I am exploring delays in spectral patches so I need to figure a few things out. </div>

<div> </div>

<div>thanks</div>
</div>
_______________________________________________ <a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" target="_blank">https://lists.puredata.info/listinfo/pd-list</a></div>
</div>
</div>
</div></div></div></blockquote></div>