At the moment I use 128 samples wavetables with a sampling freq of 44.1k. The interpolation code looks like (I know this can be reduced to a simpler equation but I wanted to give it a try):
Code: Select all
float phase;
int ind_a = int(phase);
int ind_b = ind_b + 1;
frac_1 = phase - float(ind_a );
frac_2 = float(ind_b) - phase;
if (ind_b == WAVETB_LEN)ind_b=0; // equivalent to wrapping up the table
output= wavetb[ind_a ]*frac_1 + wavetb[ind_b]*frac_2 ;
Do you think there is something I am not considering? many thanks