Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
00001 /***************************************************/ 00022 /***************************************************/ 00023 00024 #ifndef STK_STIFKARP_H 00025 #define STK_STIFKARP_H 00026 00027 #include "Instrmnt.h" 00028 #include "DelayL.h" 00029 #include "DelayA.h" 00030 #include "OneZero.h" 00031 #include "Noise.h" 00032 #include "BiQuad.h" 00033 00034 class StifKarp : public Instrmnt 00035 { 00036 public: 00038 StifKarp(StkFloat lowestFrequency); 00039 00041 ~StifKarp(); 00042 00044 void clear(); 00045 00047 void setFrequency(StkFloat frequency); 00048 00050 void setStretch(StkFloat stretch); 00051 00053 void setPickupPosition(StkFloat position); 00054 00056 00061 void setBaseLoopGain(StkFloat aGain); 00062 00064 void pluck(StkFloat amplitude); 00065 00067 void noteOn(StkFloat frequency, StkFloat amplitude); 00068 00070 void noteOff(StkFloat amplitude); 00071 00073 void controlChange(int number, StkFloat value); 00074 00075 protected: 00076 00077 StkFloat computeSample( void ); 00078 00079 DelayA delayLine_; 00080 DelayL combDelay_; 00081 OneZero filter_; 00082 Noise noise_; 00083 BiQuad biquad_[4]; 00084 00085 unsigned long length_; 00086 StkFloat loopGain_; 00087 StkFloat baseLoopGain_; 00088 StkFloat lastFrequency_; 00089 StkFloat lastLength_; 00090 StkFloat stretching_; 00091 StkFloat pluckAmplitude_; 00092 StkFloat pickupPosition_; 00093 00094 }; 00095 00096 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |