On Tue, 1 Aug 2006 22:36:19 +0100 briencrean@eircom.net wrote:
Hi all,
Im struggling with understanding how the tabread4~ object works. Im still pretty new to pd.
....
-Do I always use the output from soundfiler as the length of the array - 2?
The [tabread4~] object is an interpolating reader, it takes 4 points in the table and smoothes out the signal by using all 4 instead of just one point to calculate the output value. I forget whether the -2 is related to that in Pd or not.
You don't need to know much about the length other than to make sure the array will fit all your sound into it.
The array might contain any number of points. What matters is the rate at which you read them out of the table and so to the DAC. That [soundfiler] gives you the file length is a nice blessing.
What you use to index the table is what matters, for example a [vline~] where you give a start, end and time will always complete it's line segment in the same time, even if you alter the length.
2.Again regarding the length, taking the example B07.sampler.pd, what happens if the length of the sound file changes? Do I need to change the value I am multiplying by or is that dependant on the sampling rate of the audio file?
If the sound file changes on disk you need to reload it, but I realise that's not your question. If you change the size of the array it depends what you want to do, play the sound in the same time, or with the same pitch. In the latter case keeping the *rate* of the line constant is what you need to do.