Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
00001 #ifndef STK_PLUCKTWO_H 00002 #define STK_PLUCKTWO_H 00003 00004 #include "Instrmnt.h" 00005 #include "DelayL.h" 00006 #include "DelayA.h" 00007 #include "OneZero.h" 00008 00009 namespace stk { 00010 00011 /***************************************************/ 00029 /***************************************************/ 00030 00031 class PluckTwo : public Instrmnt 00032 { 00033 public: 00035 PluckTwo( StkFloat lowestFrequency ); 00036 00038 virtual ~PluckTwo( void ); 00039 00041 void clear( void ); 00042 00044 virtual void setFrequency( StkFloat frequency ); 00045 00047 void setDetune( StkFloat detune ); 00048 00050 void setFreqAndDetune( StkFloat frequency, StkFloat detune ); 00051 00053 void setPluckPosition( StkFloat position ); 00054 00056 00061 void setBaseLoopGain( StkFloat aGain ); 00062 00064 virtual void noteOff( StkFloat amplitude ); 00065 00066 virtual StkFloat tick( unsigned int channel = 0 ) = 0; 00067 00068 protected: 00069 00070 DelayA delayLine_; 00071 DelayA delayLine2_; 00072 DelayL combDelay_; 00073 OneZero filter_; 00074 OneZero filter2_; 00075 00076 unsigned long length_; 00077 StkFloat loopGain_; 00078 StkFloat baseLoopGain_; 00079 StkFloat lastFrequency_; 00080 StkFloat lastLength_; 00081 StkFloat detuning_; 00082 StkFloat pluckAmplitude_; 00083 StkFloat pluckPosition_; 00084 00085 }; 00086 00087 } // stk namespace 00088 00089 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2010 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |