initialize and access a function table slot
These units will return a value from the *array as a function of nsample, which is the number of the current sample, counting up from
The value of these units is that they do not need to be called on every sample and can thus be used in control loops to create amplitude curves etc. For example:
long nsample,totalsamps;
short countdown,loopsize,size;
float amp,array[???],tab[2],dur;
.
.
tableset(dur,size,tab);
.
.
for(i = 0; i < framesToRun(); i++) {
/* main performance loop */
if(!countdown--) {
/* periodic control loop */
amp = table(currentFrame(), array, tab);
countdown = loopsize;
}
.
.
}
.
.
.
If nsample points to a time greater than than that declared by dur the last value in the array will be returned.
Not sure what will happen if negative times or samples are passed in argument list.