Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


BandedWG.h

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   void controlChange(int number, StkFloat value);
00081 
00082  protected:
00083 
00084   StkFloat computeSample( void );
00085 
00086   bool doPluck_;
00087   bool trackVelocity_;
00088   int nModes_;
00089   int presetModes_;
00090   BowTable bowTable_;
00091   ADSR     adsr_;
00092   BiQuad   bandpass_[MAX_BANDED_MODES];
00093   DelayL   delay_[MAX_BANDED_MODES];
00094   StkFloat maxVelocity_;
00095   StkFloat modes_[MAX_BANDED_MODES];
00096   StkFloat frequency_;
00097   StkFloat baseGain_;
00098   StkFloat gains_[MAX_BANDED_MODES];
00099   StkFloat basegains_[MAX_BANDED_MODES];
00100   StkFloat excitation_[MAX_BANDED_MODES];
00101   StkFloat integrationConstant_;
00102   StkFloat velocityInput_;
00103   StkFloat bowVelocity_;
00104   StkFloat bowTarget_;
00105   StkFloat bowPosition_;
00106   StkFloat strikeAmp_;
00107   int strikePosition_;
00108 
00109 };
00110 
00111 #endif

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