<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Verdana; background-color: #ffffff">
Oh great many thanks!!</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Verdana; background-color: #ffffff">
josep m</p>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> matthew brandi <mfbrandi@outlook.com><br>
<b>Sent:</b> Friday, January 31, 2020 9:00 PM<br>
<b>To:</b> Jeppi Jeppi <jeppiot@hotmail.com>; Pd-List <pd-list@lists.iem.at><br>
<b>Subject:</b> Re: [PD] tabread4~ indexing issues</font>
<div> </div>
</div>
<div>
<div class="x_moz-cite-prefix">On 31/01/2020 17:09, Jeppi Jeppi wrote:<br>
</div>
<blockquote type="cite">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
 I noticed <span style="font-family:Calibri,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">
nasty clicks occur </span>when indexing arrays <span style="font-family:Calibri,Helvetica,sans-serif; background-color:rgb(255,255,255); display:inline!important">
larger than 16384 samples</span> 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.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
What is the cause and how could it be overcome?</div>
</blockquote>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Dear Josep</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">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.<br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">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.</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">I *think* that answer is error free. I hope it is helpful.</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">Best</p>
<p style="margin-top: 0px; margin-bottom: 0px;"><br>
</p>
<p style="margin-top: 0px; margin-bottom: 0px;">m<br>
</p>
<pre class="x_moz-signature" cols="85">-- 
matthew brandi</pre>
</div>
</body>
</html>