Home Information Classes Download Usage Mail List Requirements Links Tutorial

# BandedWG.h

    00001 /***************************************************/
    00030 /***************************************************/
    00031
    00032 #if !defined(__BANDEDWG_H)
    00033 #define __BANDEDWG_H
    00034
    00035 #define MAX_BANDED_MODES 20
    00036
    00037 #include "Instrmnt.h"
    00038 #include "DelayL.h"
    00039 #include "BowTabl.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(MY_FLOAT position);
    00057
    00059   void setPreset(int preset);
    00060
    00062   void setFrequency(MY_FLOAT frequency);
    00063
    00065   void startBowing(MY_FLOAT amplitude, MY_FLOAT rate);
    00066
    00068   void stopBowing(MY_FLOAT rate);
    00069
    00071   void pluck(MY_FLOAT amp);
    00072
    00074   void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude);
    00075
    00077   void noteOff(MY_FLOAT amplitude);
    00078
    00080   MY_FLOAT tick();
    00081
    00083   void controlChange(int number, MY_FLOAT value);
    00084
    00085  protected:
    00086
    00087   bool doPluck;
    00088   bool trackVelocity;
    00089   int nModes;
    00090   int presetModes;
    00091   BowTabl *bowTabl;
    00092   ADSR *adsr;
    00093   BiQuad *bandpass;
    00094   DelayL *delay;
    00095   MY_FLOAT maxVelocity;
    00096   MY_FLOAT modes[MAX_BANDED_MODES];
    00097   MY_FLOAT freakency;
    00098   MY_FLOAT baseGain;
    00099   MY_FLOAT gains[MAX_BANDED_MODES];
    00100   MY_FLOAT basegains[MAX_BANDED_MODES];
    00101   MY_FLOAT excitation[MAX_BANDED_MODES];
    00102   MY_FLOAT integrationConstant;
    00103   MY_FLOAT velocityInput;
    00104   MY_FLOAT bowVelocity;
    00105   MY_FLOAT bowTarget;
    00106   MY_FLOAT bowPosition;
    00107   MY_FLOAT strikeAmp;
    00108   int strikePosition;
    00109
    00110 };
    00111
    00112 #endif

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