Hi,
tabread4~ can not correctly deliver the first or last sample of a table. Instead it delivers the second, or one but last, respectively, instead.
tabread~ (without interpolation) does work correctly, so i suspect the interpolation algorithm to be faulty.
Anonymous
from its help file
"incoming signal is index. Indices should range from 1 to (size-2) so that the 4-point interpolation is meaningful. You can shift-drag the number box to see the effect of interpolation."
so yeah, it's because of the lagrange interpolation and it is known and documented
Looking into the tabread4~ code, it becomes obvious that this behavior is on purpose.
Nevertheless, for many applications, like interpolating window functions or ramps, it is undesirable, and potentially dangerous.
For my UPP framework, i made workarounds, one tabread2~ implementation, and a 'fixed' tabread4~ replacement, which resorts to linear interpolation at the front and back of the table area.
https://github.com/grrrr/upp/blob/master/upp.tabread2~.pd
https://github.com/grrrr/upp/blob/master/upp.tabread4~.pd
best, Thomas
Related
Bugs: #1243