home *** CD-ROM | disk | FTP | other *** search
/ PC Musician 2000 / PC_Musician_2000.iso / PCMUSIC / NOTATION / SILENCE / DLINEA.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-18  |  1.1 KB  |  42 lines

  1. /*******************************************/
  2. /*                                         */
  3. /*  AllPass Interpolating Delay Line       */
  4. /*  Object by Perry R. Cook 1995-96        */
  5. /*  This one uses a delay line of maximum  */
  6. /*  length specified on creation, and      */ 
  7. /*  interpolates fractional length using   */
  8. /*  an all-pass filter.  This version is   */
  9. /*  more efficient for computing static    */
  10. /*  length delay lines (alpha and coeff    */
  11. /*  are computed only when the length      */  
  12. /*  is set, there probably is a more       */ 
  13. /*  efficient computational form if alpha  */
  14. /*  is changed often (each sample)).       */
  15. /*                                         */
  16. /*******************************************/
  17.  
  18.  
  19. #if !defined(__DLineA_h)
  20. #define __DLineA_h
  21.  
  22. #include "Filter.h"
  23.  
  24. class DLineA : public Filter
  25. {
  26.   protected:  
  27.     long inPoint;
  28.     long outPoint;
  29.     long length;
  30.     MY_FLOAT alpha;
  31.     MY_FLOAT coeff;
  32.     MY_FLOAT lastIn;
  33.   public:
  34.     DLineA(long max_length);
  35.     ~DLineA();
  36.     void clear();
  37.     void setDelay(MY_FLOAT length);
  38.     MY_FLOAT tick(MY_FLOAT sample);
  39. };
  40.  
  41. #endif
  42.