Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


PluckTwo.h

00001 /***************************************************/
00019 /***************************************************/
00020 
00021 #ifndef STK_PLUCKTWO_H
00022 #define STK_PLUCKTWO_H
00023 
00024 #include "Instrmnt.h"
00025 #include "DelayL.h"
00026 #include "DelayA.h"
00027 #include "OneZero.h"
00028 
00029 class PluckTwo : public Instrmnt
00030 {
00031  public:
00033   PluckTwo(StkFloat lowestFrequency);
00034 
00036   virtual ~PluckTwo();
00037 
00039   void clear();
00040 
00042   virtual void setFrequency(StkFloat frequency);
00043 
00045   void setDetune(StkFloat detune);
00046 
00048   void setFreqAndDetune(StkFloat frequency, StkFloat detune);
00049 
00051   void setPluckPosition(StkFloat position);
00052 
00054 
00059   void setBaseLoopGain(StkFloat aGain);
00060 
00062   virtual void noteOff(StkFloat amplitude);
00063 
00064  protected:
00065 
00066   virtual StkFloat computeSample( void ) = 0;
00067 
00068   DelayA  delayLine_;
00069   DelayA  delayLine2_;
00070   DelayL  combDelay_;
00071   OneZero filter_;
00072   OneZero filter2_;
00073 
00074   unsigned long length_;
00075   StkFloat loopGain_;
00076   StkFloat baseLoopGain_;
00077   StkFloat lastFrequency_;
00078   StkFloat lastLength_;
00079   StkFloat detuning_;
00080   StkFloat pluckAmplitude_;
00081   StkFloat pluckPosition_;
00082 
00083 };
00084 
00085 #endif

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