Home Information Classes Download Usage Mail List Requirements Links Tutorial

# Simple.h

    00001 /***************************************************/
    00018 /***************************************************/
    00019
    00020 #if !defined(__SIMPLE_H)
    00021 #define __SIMPLE_H
    00022
    00023 #include "Instrmnt.h"
    00024 #include "ADSR.h"
    00025 #include "WaveLoop.h"
    00026 #include "OnePole.h"
    00027 #include "BiQuad.h"
    00028 #include "Noise.h"
    00029
    00030 class Simple : public Instrmnt
    00031 {
    00032  public:
    00034   Simple();
    00035
    00037   virtual ~Simple();
    00038
    00040   void clear();
    00041
    00043   virtual void setFrequency(MY_FLOAT frequency);
    00044
    00046   void keyOn();
    00047
    00049   void keyOff();
    00050
    00052   virtual void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude);
    00053
    00055   virtual void noteOff(MY_FLOAT amplitude);
    00056
    00058   virtual MY_FLOAT tick();
    00059
    00061   virtual void controlChange(int number, MY_FLOAT value);
    00062
    00063  protected:
    00064   ADSR     *adsr;
    00065   WaveLoop  *loop;
    00066   OnePole  *filter;
    00067   BiQuad   *biquad;
    00068   Noise    *noise;
    00069   MY_FLOAT baseFrequency;
    00070   MY_FLOAT loopGain;
    00071
    00072 };
    00073
    00074 #endif

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