Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Delay.h

00001 /***************************************************/
00019 /***************************************************/
00020 
00021 #ifndef STK_DELAY_H
00022 #define STK_DELAY_H
00023 
00024 #include "Filter.h"
00025 
00026 class Delay : protected Filter
00027 {
00028 public:
00029 
00031   Delay();
00032 
00034 
00039   Delay(unsigned long delay, unsigned long maxDelay);
00040 
00042   virtual ~Delay();
00043 
00045   void clear();
00046 
00048 
00055   void setMaximumDelay(unsigned long delay);
00056 
00058 
00061   void setDelay(unsigned long delay);
00062 
00064   unsigned long getDelay(void) const;
00065 
00067   StkFloat energy(void) const;
00068 
00070 
00075   StkFloat contentsAt(unsigned long tapDelay);
00076 
00078   StkFloat lastOut(void) const;
00079 
00081 
00084   virtual StkFloat nextOut(void);
00085 
00087   virtual StkFloat tick(StkFloat sample);
00088 
00090 
00096   virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 0 );
00097 
00098 protected:
00099 
00100   // This function must be implemented in all subclasses. It is used
00101   // to get around a C++ problem with overloaded virtual functions.
00102   virtual StkFloat computeSample( StkFloat input );
00103 
00104   unsigned long inPoint_;
00105   unsigned long outPoint_;
00106   StkFloat delay_;
00107 };
00108 
00109 #endif
00110 

The Synthesis ToolKit in C++ (STK)
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.