Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Effect.h

00001 /***************************************************/
00010 /***************************************************/
00011 
00012 #include "Stk.h"
00013 
00014 #ifndef STK_EFFECT_H
00015 #define STK_EFFECT_H
00016 
00017 class Effect : public Stk
00018 {
00019  public:
00021   Effect();
00022 
00024   virtual ~Effect();
00025 
00027   virtual void clear() = 0;
00028 
00030   void setEffectMix(StkFloat mix);
00031 
00033   StkFloat lastOut() const;
00034 
00036   StkFloat lastOutLeft() const;
00037 
00039   StkFloat lastOutRight() const;
00040 
00042   StkFloat tick( StkFloat input );
00043 
00045 
00051   StkFrames& tick( StkFrames& frames, unsigned int channel = 0 );
00052 
00053  protected:
00054 
00055   // This abstract function must be implemented in all subclasses.
00056   // It is used to get around a C++ problem with overloaded virtual
00057   // functions.
00058   virtual StkFloat computeSample( StkFloat input ) = 0;
00059 
00060   // Returns true if argument value is prime.
00061   bool isPrime( int number );
00062 
00063   StkFloat lastOutput_[2];
00064   StkFloat effectMix_;
00065 
00066 };
00067 
00068 #endif
00069 

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