Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Plucked.h

00001 /***************************************************/
00018 /***************************************************/
00019 
00020 #ifndef STK_PLUCKED_H
00021 #define STK_PLUCKED_H
00022 
00023 #include "Instrmnt.h"
00024 #include "DelayA.h"
00025 #include "OneZero.h"
00026 #include "OnePole.h"
00027 #include "Noise.h"
00028 
00029 class Plucked : public Instrmnt
00030 {
00031  public:
00033   Plucked(StkFloat lowestFrequency);
00034 
00036   ~Plucked();
00037 
00039   void clear();
00040 
00042   virtual void setFrequency(StkFloat frequency);
00043 
00045   void pluck(StkFloat amplitude);
00046 
00048   virtual void noteOn(StkFloat frequency, StkFloat amplitude);
00049 
00051   virtual void noteOff(StkFloat amplitude);
00052 
00053  protected:  
00054 
00055   StkFloat computeSample( void );
00056 
00057   DelayA   delayLine_;
00058   OneZero  loopFilter_;
00059   OnePole  pickFilter_;
00060   Noise    noise_;
00061   StkFloat loopGain_;
00062   unsigned long length_;
00063 
00064 };
00065 
00066 #endif
00067 

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