On Thu, Jun 14, 2012 at 2:56 PM, Charles Henry czhenry@gmail.com wrote:
I'm not sure I understood the whole thread so far... let me back up:
I'm not sure that you want to write samples of a function to the table for each sample you want to write.
You start with two signals (blocks of N), one is the data you want to write, the other is the indexes where you want the variables written.
The data you want to write is an evenly spaced signal with spectrum on -1/2 < f < 1/2.
Depending on how closely spaced the indexes are, you get aliasing on side, and on the other you have more spectrum than you need.
Close together (data written to buffer slower than normal speed): aliasing. The signal that we're writing to the table has fewer points than what's needed to cover the spectrum of the input signal.
If all you did was write 4 points from a constant interpolator, you'd still have the aliasing.
Right -- but this is no different from [tabread4~] and the rest -- you'll have aliasing when downsampling on read just as much as on write. On write, though, you can pre-filter the incoming signal if you want to reduce aliasing -- just treat it as a normal oversampled signal that you're going to decimate.
Far apart (writing faster): There's evidently a possibility of a perfect reconstruction because you've got more points than you need. I think that can be done with sinc functions, and then you can choose finite-length interpolator functions as approximations. This is the easy part of the problem, if you just ignore how potentially expensive it is :)
What I see happening is that you when you write-then-read with tabwrite4~ / tabread4~, you get back a sampling of convolving each of the interpolation functions and the input data. The effect of each sample spreads out to cover 8 samples on the output.
The "usual use" would be to write the table with interpolation and then read straight through it without interpolation when it's time to read. But really, there's nothing preventing anyone from sending the output of, say, [vd~] into another delay with [vd~] -- you just have to know what you're getting into if you're going to use it this way.
Matt