Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Function.h

00001 /***************************************************/
00011 /***************************************************/
00012 
00013 #include "Stk.h"
00014 
00015 #ifndef STK_FUNCTION_H
00016 #define STK_FUNCTION_H
00017 
00018 class Function : public Stk
00019 {
00020  public:
00022   Function();
00023 
00025   virtual ~Function();
00026 
00028   virtual StkFloat lastOut() const { return lastOutput_; };
00029 
00031   StkFloat tick( StkFloat input );
00032 
00034 
00040   virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 0 );
00041 
00042  protected:
00043 
00044   // This abstract function must be implemented in all subclasses.
00045   // It is used to get around a C++ problem with overloaded virtual
00046   // functions.
00047   virtual StkFloat computeSample( StkFloat input ) = 0;
00048 
00049   StkFloat lastOutput_;
00050 
00051 };
00052 
00053 #endif
00054 

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