Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00023 /***************************************************/ 00024 00025 #ifndef STK_CLARINET_H 00026 #define STK_CLARINET_H 00027 00028 #include "Instrmnt.h" 00029 #include "DelayL.h" 00030 #include "ReedTable.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 00043 Clarinet(StkFloat lowestFrequency); 00044 00046 ~Clarinet(); 00047 00049 void clear(); 00050 00052 void setFrequency(StkFloat frequency); 00053 00055 void startBlowing(StkFloat amplitude, StkFloat rate); 00056 00058 void stopBlowing(StkFloat rate); 00059 00061 void noteOn(StkFloat frequency, StkFloat amplitude); 00062 00064 void noteOff(StkFloat amplitude); 00065 00067 StkFloat tick(); 00068 00070 StkFloat *tick(StkFloat *vector, unsigned int vectorSize); 00071 00073 00079 StkFrames& tick( StkFrames& frames, unsigned int channel = 1 ); 00080 00082 void controlChange(int number, StkFloat value); 00083 00084 protected: 00085 DelayL delayLine_; 00086 ReedTable reedTable_; 00087 OneZero filter_; 00088 Envelope envelope_; 00089 Noise noise_; 00090 WaveLoop *vibrato_; 00091 long length_; 00092 StkFloat outputGain_; 00093 StkFloat noiseGain_; 00094 StkFloat vibratoGain_; 00095 00096 }; 00097 00098 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |