Home Information Classes Download Usage Mail List Requirements Links Tutorial

# Modal.h

    00001 /***************************************************/
    00012 /***************************************************/
    00013
    00014 #if !defined(__MODAL_H)
    00015 #define __MODAL_H
    00016
    00017 #include "Instrmnt.h"
    00018 #include "Envelope.h"
    00019 #include "WaveLoop.h"
    00020 #include "BiQuad.h"
    00021 #include "OnePole.h"
    00022
    00023 class Modal : public Instrmnt
    00024 {
    00025 public:
    00027   Modal( int modes = 4 );
    00028
    00030   virtual ~Modal();
    00031
    00033   void clear();
    00034
    00036   virtual void setFrequency(MY_FLOAT frequency);
    00037
    00039   void setRatioAndRadius(int modeIndex, MY_FLOAT ratio, MY_FLOAT radius);
    00040
    00042   void setMasterGain(MY_FLOAT aGain);
    00043
    00045   void setDirectGain(MY_FLOAT aGain);
    00046
    00048   void setModeGain(int modeIndex, MY_FLOAT gain);
    00049
    00051   virtual void strike(MY_FLOAT amplitude);
    00052
    00054   void damp(MY_FLOAT amplitude);
    00055
    00057   void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude);
    00058
    00060   void noteOff(MY_FLOAT amplitude);
    00061
    00063   virtual MY_FLOAT tick();
    00064
    00066   virtual void controlChange(int number, MY_FLOAT value) = 0;
    00067
    00068 protected:
    00069   Envelope *envelope;
    00070   WvIn     *wave;
    00071   BiQuad   **filters;
    00072   OnePole  *onepole;
    00073   WaveLoop *vibrato;
    00074   int nModes;
    00075   MY_FLOAT vibratoGain;
    00076   MY_FLOAT masterGain;
    00077   MY_FLOAT directGain;
    00078   MY_FLOAT stickHardness;
    00079   MY_FLOAT strikePosition;
    00080   MY_FLOAT baseFrequency;
    00081   MY_FLOAT *ratios;
    00082   MY_FLOAT *radii;
    00083
    00084 };
    00085
    00086 #endif

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