[PD] tabread4~ indexing issues

matthew brandi mfbrandi at outlook.com
Fri Jan 31 21:00:51 CET 2020


On 31/01/2020 17:09, Jeppi Jeppi wrote:
 I noticed nasty clicks occur when indexing arrays larger than 16384 samples with tabread4~. I attach a demo file, notice I index the array with a cosine therefore no discontinuities are expected, yet beyond that size I get regular clicks.
What is the cause and how could it be overcome?


Dear Josep


Check the size of your table. It is 16,387 points, I believe — i.e. 16,384 (a power of two) plus 3 guard points (1 at the beginning, 2 at the end). 20,000 isn’t a power of two, so sinesum looks for the largest power of two less than 20,000 (i.e. 16,384), and you end up trying to scan past the end of the table.


If you give sinesum a power of two to chew on (it will add the guard points itself) and only scan the table less the guard points, you should be OK. I tested this with a table of 65,536 (+ 3) points, and it was fine.


I *think* that answer is error free. I hope it is helpful.


Best


m

--
matthew brandi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20200131/63520b1c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: table-size.png
Type: image/png
Size: 19886 bytes
Desc: table-size.png
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20200131/63520b1c/attachment-0001.png>


More information about the Pd-list mailing list