#include "../H/ugens.h" #include #include "../macros/macros.h" #define NPOLE 32 #define NPOLEM1 31 #define FRAMSIZE (NPOLE+4) #define FPREC 22 #define RECSIZE (FPREC*FRAMSIZE) #define BPREC (RECSIZE*FLOAT) #define BPFRAME (FRAMSIZE*FLOAT) float FTEMP1,FTEMP2; int ITEMP1; #define WARPPOL(sig,past,d,c) \ FTEMP1 = past[NPOLEM1];\ past[NPOLEM1] = cq * outold - d * past[NPOLEM1];\ for(ITEMP1=NPOLE-2; ITEMP1>=0; ITEMP1--) {\ FTEMP2 = past[ITEMP1];\ past[ITEMP1] = d * (past[ITEMP1+1] - past[ITEMP1]) + FTEMP1;\ FTEMP1 = FTEMP2;\ }\ for(ITEMP1=0;ITEMP1 1.) xamp= 1; buzzamp = (1.- xamp) * ampmlt; ramp = ampmlt * xamp * randamp; c[3] *= pchmult; si = c[3] * magic ; hn = (int)(srd2/c[3]); counter = (float)(SR/c[3]); } /* val = buzz(buzzamp,si,hn,f,&phs) + */ BUZZ(val,buzzamp,si,hn,f,phs); /* val += (float)(rand()-randoff) * ramp; */ WARPPOL(val,past,warpval,cpoint); val *= cl; WIPEOUT(&val,0); } endnote(0); } getfr(frameno,c) float frameno,*c; { int frame,i,j; static float array[RECSIZE]; float fraction; static int oldframe = 0; static int endframe = 0; frame = (int)frameno; fraction = frameno - (float)frame; if(!((frame >= oldframe) && (frame < endframe))) { lseek(anal,((long)frame*(long)BPFRAME),0); read(anal,(char *)array,BPREC); oldframe = frame; endframe = oldframe + FPREC - 1; } for(i=(frame-oldframe)*FRAMSIZE,j=0; j=0; n--) { temp2 = past[n]; past[n] = d * (past[n+1] - past[n]) + temp1; temp1 = temp2; } for(n=0;n