00001 /* Copyright 1993-1996 by J.O. Smith (jos@ccrma.stanford.edu). All rights reserved. */ 00002 00003 #define GOLDEN_MEAN 1.61 00004 00005 typedef struct _delayaiVars { 00006 pp output; 00007 pp input; 00008 pp delayInput; /* Must be in the range [0-1.0). It is 00009 * scaled by the delay length and subtracted 00010 * from the write pointer. */ 00011 MKWavetable delayMemory; 00012 int length; /* Length of delay line (may be < delayMemory size) */ 00013 int xnM1; /* length-1 (an optimization) */ 00014 int ynM1; /* length-1 (an optimization) */ 00015 int writeIndex;/* Delay memory write index */ 00016 int readIndex; /* Delay memory read index */ 00017 word apCoef; /* allPass coefficient, calculated from fractional delay */ 00018 double prev_delay; /* optimization */ 00019 } delayaiVars; 00020 00021 00022 extern void init_delayai(delayaiVars *a); 00023 extern void delayai(delayaiVars *a); 00024 00025