Home Information Classes Download Usage Mail List Requirements Links Tutorial

# Resonate.h

    00001 /***************************************************/
    00018 /***************************************************/
    00019
    00020 #if !defined(__RESONATE_H)
    00021 #define __RESONATE_H
    00022
    00023 #include "Instrmnt.h"
    00024 #include "ADSR.h"
    00025 #include "BiQuad.h"
    00026 #include "Noise.h"
    00027
    00028 class Resonate : public Instrmnt
    00029 {
    00030  public:
    00032   Resonate();
    00033
    00035   ~Resonate();
    00036
    00038   void clear();
    00039
    00041   void setResonance(MY_FLOAT frequency, MY_FLOAT radius);
    00042
    00044   void setNotch(MY_FLOAT frequency, MY_FLOAT radius);
    00045
    00047   void setEqualGainZeroes();
    00048
    00050   void keyOn();
    00051
    00053   void keyOff();
    00054
    00056   void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude);
    00057
    00059   void noteOff(MY_FLOAT amplitude);
    00060
    00062   MY_FLOAT tick();
    00063
    00065   virtual void controlChange(int number, MY_FLOAT value);
    00066
    00067  protected:
    00068   ADSR     *adsr;
    00069   BiQuad   *filter;
    00070   Noise    *noise;
    00071   MY_FLOAT poleFrequency;
    00072   MY_FLOAT poleRadius;
    00073   MY_FLOAT zeroFrequency;
    00074   MY_FLOAT zeroRadius;
    00075
    00076 };
    00077
    00078 #endif

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