[PD] getting the first and last element of an array using tabread4

Charles Henry czhenry at gmail.com
Fri Mar 2 16:29:06 CET 2012


On Fri, Mar 2, 2012 at 3:41 AM, Aykut Caglayan <aykut_caglayan at yahoo.com> wrote:
> What is the reason for not being able to get the accurate value of the first
> and last element of an array using tabread4?

The array used by tabread4~ expects to have 1 sample copied from the
last element of the array to the beginning, and 2 samples from the
beginning copied to the end of the array.  You get this automatically
when using the sinesum/cosinesum array creation methods for example.
Others?

For a given fractional index x on [n, n+1)  tabread4~ takes four
points f[n-1], f[n], f[n+1], f[n+2].

So, if you start with an N length array, you want to have it be N+3
long to hold the extra points and index it between 1 and N.

Chuck



More information about the Pd-list mailing list