Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

# BandedWG.h

    00001 #ifndef STK_BANDEDWG_H
    00002 #define STK_BANDEDWG_H
    00003
    00004 #include "Instrmnt.h"
    00005 #include "DelayL.h"
    00006 #include "BowTable.h"
    00007 #include "ADSR.h"
    00008 #include "BiQuad.h"
    00009
    00010 namespace stk {
    00011
    00012 /***************************************************/
    00041 /***************************************************/
    00042
    00043 const int MAX_BANDED_MODES = 20;
    00044
    00045 class BandedWG : public Instrmnt
    00046 {
    00047  public:
    00049   BandedWG( void );
    00050
    00052   ~BandedWG( void );
    00053
    00055   void clear( void );
    00056
    00058   void setStrikePosition( StkFloat position );
    00059
    00061   void setPreset( int preset );
    00062
    00064   void setFrequency( StkFloat frequency );
    00065
    00067   void startBowing( StkFloat amplitude, StkFloat rate );
    00068
    00070   void stopBowing( StkFloat rate );
    00071
    00073   void pluck( StkFloat amp );
    00074
    00076   void noteOn( StkFloat frequency, StkFloat amplitude );
    00077
    00079   void noteOff( StkFloat amplitude );
    00080
    00082   void controlChange( int number, StkFloat value );
    00083
    00085   StkFloat tick( unsigned int channel = 0 );
    00086
    00087  protected:
    00088
    00089   bool doPluck_;
    00090   bool trackVelocity_;
    00091   int nModes_;
    00092   int presetModes_;
    00093   BowTable bowTable_;
    00094   ADSR     adsr_;
    00095   BiQuad   bandpass_[MAX_BANDED_MODES];
    00096   DelayL   delay_[MAX_BANDED_MODES];
    00097   StkFloat maxVelocity_;
    00098   StkFloat modes_[MAX_BANDED_MODES];
    00099   StkFloat frequency_;
    00100   StkFloat baseGain_;
    00101   StkFloat gains_[MAX_BANDED_MODES];
    00102   StkFloat basegains_[MAX_BANDED_MODES];
    00103   StkFloat excitation_[MAX_BANDED_MODES];
    00104   StkFloat integrationConstant_;
    00105   StkFloat velocityInput_;
    00106   StkFloat bowVelocity_;
    00107   StkFloat bowTarget_;
    00108   StkFloat bowPosition_;
    00109   StkFloat strikeAmp_;
    00110   int strikePosition_;
    00111
    00112 };
    00113
    00114 } // stk namespace
    00115
    00116 #endif

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