streamin in;
streamout out;
streamin freq;
float index;
float f,frac;
float temp1,temp2;
float x1;
float mem[10000];
temp1 = freq - 0.5;
f = rndint(temp1);
frac = freq - f;
index=index+1;
index=index-(index>=10000)&10000;
mem[index]=in;
temp1 = index - f;
temp1 = temp1 + (temp1 < 0)&10000;
temp1 = mem[temp1];
temp2 = index - f - 1;
temp2 = temp2 + (temp2 < 0)&10000;
temp2 = mem[temp2];
out = (1 - frac) * temp1 + frac * temp2;
多谢上面的朋友的耐心回复。
全局代码来了
这是一个DSP效果器的算法代码。。。。。不太明白。。