KarplusString.h

Go to the documentation of this file.
00001 //
00002 //  KarplusString.h -- the simplest possible "physical model" string class
00003 //  See the copyright notice and acknowledgment of authors in the file COPYRIGHT
00004 //
00005 
00006 /* TODO:
00007     Jorge . . . November 2005
00008     1) Add a dump() function.
00009     2) implement exceptions
00010     3) add DEBUG print code.
00011     4) make it scalable . . .
00012     5) allow for dynamic frequency . . . ? do we want that?
00013     6) add a trigger function . . . (do we need an envelope?)
00014 */
00015 
00016 
00017 #ifndef CSL_KARPLUSSTRING_H
00018 #define CSL_KARPLUSSTRING_H
00019 
00020 #include "CSL_Core.h"       // my superclass
00021 //#include "RingBuffer.h"
00022 //#include "Filters.h"
00023 #include "Noise.h"
00024 
00025 namespace csl {                 // my namespace
00026 
00030 
00031 class KarplusString : public UnitGenerator, public Scalable, public Phased {
00032 
00033 public:
00034     Buffer mDelayLine;              
00035     KarplusString(float frequency);
00036 
00037     void trigger();                 
00038 
00039     void dump();                    
00040 
00041 protected:  
00042     void initDelayLine();           
00043     unsigned mIndex;                
00044     unsigned mDelayLength;          
00045     
00046     void nextBuffer(Buffer &outputBuffer, unsigned outBufNum) throw (CException);
00047 
00048     
00049 };      // end of class spec.
00050 
00051 }       // end of namespace
00052 
00053 #endif
00054 

Generated on Thu Sep 17 23:14:16 2009 for CSL by  doxygen 1.5.8