Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Simple.h

00001 /***************************************************/
00018 /***************************************************/
00019 
00020 #ifndef STK_SIMPLE_H
00021 #define STK_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 
00037   Simple();
00038 
00040   ~Simple();
00041 
00043   void clear();
00044 
00046   void setFrequency(StkFloat frequency);
00047 
00049   void keyOn();
00050 
00052   void keyOff();
00053 
00055   void noteOn(StkFloat frequency, StkFloat amplitude);
00056 
00058   void noteOff(StkFloat amplitude);
00059 
00061   StkFloat tick();
00062 
00064   StkFloat *tick(StkFloat *vector, unsigned int vectorSize);
00065 
00067 
00073   StkFrames& tick( StkFrames& frames, unsigned int channel = 1 );
00074 
00076   void controlChange(int number, StkFloat value);
00077 
00078  protected:  
00079   ADSR      adsr_; 
00080   WaveLoop *loop_;
00081   OnePole   filter_;
00082   BiQuad    biquad_;
00083   Noise     noise_;
00084   StkFloat  baseFrequency_;
00085   StkFloat  loopGain_;
00086 
00087 };
00088 
00089 #endif

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