Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   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 
00065   virtual StkFloat tick() = 0;
00066 
00068   virtual StkFloat *tick(StkFloat *vector, unsigned int vectorSize) = 0;
00069 
00071 
00077   virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 1 ) = 0;
00078 
00079  protected:  
00080     DelayA  delayLine_;
00081     DelayA  delayLine2_;
00082     DelayL  combDelay_;
00083     OneZero filter_;
00084     OneZero filter2_;
00085 
00086     unsigned long length_;
00087     StkFloat loopGain_;
00088     StkFloat baseLoopGain_;
00089     StkFloat lastFrequency_;
00090     StkFloat lastLength_;
00091     StkFloat detuning_;
00092     StkFloat pluckAmplitude_;
00093     StkFloat pluckPosition_;
00094 
00095 };
00096 
00097 #endif

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