Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   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 
00054   virtual StkFloat tick();
00055 
00057   virtual StkFloat *tick(StkFloat *vector, unsigned int vectorSize);
00058 
00060 
00066   virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 1 );
00067 
00068  protected:  
00069   DelayA   delayLine_;
00070   OneZero  loopFilter_;
00071   OnePole  pickFilter_;
00072   Noise    noise_;
00073   StkFloat loopGain_;
00074   unsigned long length_;
00075 
00076 };
00077 
00078 #endif
00079 

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