<div style="color:black;font: 10pt arial;">I have a [vdhs~] object in my library that does hermite spline interpolation for a delay line (like tabread4c~).
<div>https://github.com/sebshader/shadylib<br>

<div>(also on deken)</div>

<div><br>
</div>

<div>I had to re-make delread~ as delread4c~ because delread~s delay lines are not exposed in the .h files<br>
<br>
-seb</div>

<div><br>

<div style="font-family:helvetica,arial;font-size:10pt;color:black"><font size="2">-----Original Message-----<br>
From: Max <abonnements@revolwear.com><br>
To: pd-list@lists.iem.at <pd-list@lists.iem.at><br>
Sent: Sun, Apr 25, 2021 5:45 am<br>
Subject: [PD] 4-point interpolation changes timbre depending on sample rate<br>
<br>

<div dir="ltr">Hi list,<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">the 4-point interpolation in tabread4~ has been a popular topic in the <br>
</div>

<div dir="ltr">past, going back to at least 2008. [1]<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">A similar issue is in delread4~. In fact a simple resonator changes its <br>
</div>

<div dir="ltr">timbre quite drastically by just changing the sample rate of the audio <br>
</div>

<div dir="ltr">interface. Attached is a test patch.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">The issue becomes audible when choosing an odd delay time and compare <br>
</div>

<div dir="ltr">the result between an odd and an even sample rate (e.g. 44.1k vs. 48k).<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">This is not good. In fact this is a serious defect. Imagine you want to <br>
</div>

<div dir="ltr">market a product like a synth plugin (based on libpd) which sounds <br>
</div>

<div dir="ltr">different depending on if the daw is opened in 44.1 or 48 kHz.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">Cyrille Henry has coded tabread4c~ with a four-point cubic interpolation <br>
</div>

<div dir="ltr">in the nusmuk library, but there is no delread4c~ equivalent in nusmuk.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">Clemens Wegener has coded delreadsinc~ which implements a <br>
</div>

<div dir="ltr">Whittaker–Shannon interpolation (Sinc function). This implementation <br>
</div>

<div dir="ltr">does sounds consistent in any sample rate. It also sounds much better at <br>
</div>

<div dir="ltr">very slow speeds inside a pitch shifter where delread4~ produces serious <br>
</div>

<div dir="ltr">artefacts. The Sinc function requires a larger padding for the <br>
</div>

<div dir="ltr">interpolation.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">There are a couple of questions regarding on how to contribute this to Pd.<br>
</div>

<div dir="ltr">Vanilla objects are currently:<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">delwrite~ = the sink<br>
</div>

<div dir="ltr">delread~ = control rate tap<br>
</div>

<div dir="ltr">delread4~ (vd~) = audio rate tap with a four-point interpolation<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">1. the code in delwrite~ isn't agnostic towards the interpolation since <br>
</div>

<div dir="ltr">it already provides the padding for the 4 point interpolation<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">2. if we add more interpolation methods to delread / tabread, the <br>
</div>

<div dir="ltr">cleanest way would be to just have one tap object and the interpolation <br>
</div>

<div dir="ltr">can be changed by a message and argument to it. currently there are <br>
</div>

<div dir="ltr">implementations for the miller 4pt, cubic 4pt and Sinc.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">Unfortunately delread4 already carries the 4 from 4-point interpolation <br>
</div>

<div dir="ltr">in its name, so probably it would be the best to deprecate that and find <br>
</div>

<div dir="ltr">a new name like varidelay~ or so.<br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">[1] Review of tabread4~ threads in the archive <br>
</div>

<div dir="ltr"><a href="https://lists.puredata.info/pipermail/pd-list/2019-06/125391.html" target="_blank">https://lists.puredata.info/pipermail/pd-list/2019-06/125391.html</a><br>
</div>

<div dir="ltr"><br>
</div>

<div dir="ltr">[2] <a href="https://github.com/chairaudio/pure-data/tree/feature/delreadsinc" target="_blank">https://github.com/chairaudio/pure-data/tree/feature/delreadsinc</a><br>
</div>

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