# [PD] Sinesum, cosinesum and cubic interpolation's guard points

Thu Sep 5 09:45:15 CEST 2013

```When you send this message [sinesum 512 1( to a table Pd will automatically
add one index to the beginning of the table and two indices to its end, and
you end up with a table of 515 indices. The three additional indices are
the guard points for the cubic interpolation, right? So the first index
should be a copy of the last element (here, index 0 a copy of index 512),
and the last two indices should be copies of the first two elements (here,
indices 513 and 514 copies of indices 1 and 2 respectively). Am I getting
it right up to here? Well, with the message [cosinesum 512 0 1( this is
indeed true; these are the values I get:
index 512 = 0.999925
index 0 = 0.999925
index 1 = 1
index 513 = 1
index 2 = 0.999925
index 514 = 0.999925

Well, the second and the last elements have the same value anyway (index 2
and 512), which makes sense as it's a cosine.
But if I send [sinesum 512 1( I'm getting these results:
index 512 = -0.0122768
index 0 = -0.0122715
index 1 = 0
index 513 = -5.30718e-06
index 2 = 0.0122715
index 514 = 0.0122662

OK, index 0 is the negative of index 2, which can again make sense as it's
a sine (supposing that index 0 is a copy of the table's last element), but
index 512 doesn't have that value, why? And why do indices 1 and 513 have
different values too?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130905/b09347c7/attachment.htm>
```