Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00023 /***************************************************/ 00024 00025 #if !defined(__CLARINET_H) 00026 #define __CLARINET_H 00027 00028 #include "Instrmnt.h" 00029 #include "DelayL.h" 00030 #include "ReedTabl.h" 00031 #include "OneZero.h" 00032 #include "Envelope.h" 00033 #include "Noise.h" 00034 #include "WaveLoop.h" 00035 00036 class Clarinet : public Instrmnt 00037 { 00038 public: 00040 Clarinet(MY_FLOAT lowestFrequency); 00041 00043 ~Clarinet(); 00044 00046 void clear(); 00047 00049 void setFrequency(MY_FLOAT frequency); 00050 00052 void startBlowing(MY_FLOAT amplitude, MY_FLOAT rate); 00053 00055 void stopBlowing(MY_FLOAT rate); 00056 00058 void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude); 00059 00061 void noteOff(MY_FLOAT amplitude); 00062 00064 MY_FLOAT tick(); 00065 00067 void controlChange(int number, MY_FLOAT value); 00068 00069 protected: 00070 DelayL *delayLine; 00071 ReedTabl *reedTable; 00072 OneZero *filter; 00073 Envelope *envelope; 00074 Noise *noise; 00075 WaveLoop *vibrato; 00076 long length; 00077 MY_FLOAT outputGain; 00078 MY_FLOAT noiseGain; 00079 MY_FLOAT vibratoGain; 00080 00081 }; 00082 00083 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |