Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00030 /***************************************************/ 00031 00032 #ifndef STK_BANDEDWG_H 00033 #define STK_BANDEDWG_H 00034 00035 const int MAX_BANDED_MODES = 20; 00036 00037 #include "Instrmnt.h" 00038 #include "DelayL.h" 00039 #include "BowTable.h" 00040 #include "ADSR.h" 00041 #include "BiQuad.h" 00042 00043 class BandedWG : public Instrmnt 00044 { 00045 public: 00047 BandedWG(); 00048 00050 ~BandedWG(); 00051 00053 void clear(); 00054 00056 void setStrikePosition(StkFloat position); 00057 00059 void setPreset(int preset); 00060 00062 void setFrequency(StkFloat frequency); 00063 00065 void startBowing(StkFloat amplitude, StkFloat rate); 00066 00068 void stopBowing(StkFloat rate); 00069 00071 void pluck(StkFloat amp); 00072 00074 void noteOn(StkFloat frequency, StkFloat amplitude); 00075 00077 void noteOff(StkFloat amplitude); 00078 00080 StkFloat tick(); 00081 00083 StkFloat *tick(StkFloat *vector, unsigned int vectorSize); 00084 00086 00092 StkFrames& tick( StkFrames& frames, unsigned int channel = 1 ); 00093 00095 void controlChange(int number, StkFloat value); 00096 00097 protected: 00098 00099 bool doPluck_; 00100 bool trackVelocity_; 00101 int nModes_; 00102 int presetModes_; 00103 BowTable bowTable_; 00104 ADSR adsr_; 00105 BiQuad bandpass_[MAX_BANDED_MODES]; 00106 DelayL delay_[MAX_BANDED_MODES]; 00107 StkFloat maxVelocity_; 00108 StkFloat modes_[MAX_BANDED_MODES]; 00109 StkFloat frequency_; 00110 StkFloat baseGain_; 00111 StkFloat gains_[MAX_BANDED_MODES]; 00112 StkFloat basegains_[MAX_BANDED_MODES]; 00113 StkFloat excitation_[MAX_BANDED_MODES]; 00114 StkFloat integrationConstant_; 00115 StkFloat velocityInput_; 00116 StkFloat bowVelocity_; 00117 StkFloat bowTarget_; 00118 StkFloat bowPosition_; 00119 StkFloat strikeAmp_; 00120 int strikePosition_; 00121 00122 }; 00123 00124 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |