Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   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   void controlChange(int number, StkFloat value);
00062 
00063  protected:
00064 
00065   StkFloat computeSample( void );
00066 
00067   ADSR      adsr_; 
00068   WaveLoop *loop_;
00069   OnePole   filter_;
00070   BiQuad    biquad_;
00071   Noise     noise_;
00072   StkFloat  baseFrequency_;
00073   StkFloat  loopGain_;
00074 
00075 };
00076 
00077 #endif

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