[PD] tabread4~ indexing issues

Jeppi Jeppi jeppiot at hotmail.com
Mon Feb 3 22:16:47 CET 2020

Oh great many thanks!!

josep m

From: matthew brandi <mfbrandi at outlook.com>
Sent: Friday, January 31, 2020 9:00 PM
To: Jeppi Jeppi <jeppiot at hotmail.com>; Pd-List <pd-list at lists.iem.at>
Subject: Re: [PD] tabread4~ indexing issues

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.



matthew brandi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20200203/3d345e6b/attachment.html>

More information about the Pd-list mailing list