Home Information Classes Download Usage Mail List Requirements Links FAQ 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 "SineWave.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 void controlChange(int number, StkFloat value); 00068 00069 protected: 00070 00071 StkFloat computeSample( void ); 00072 00073 DelayL delayLine_; 00074 ReedTable reedTable_; 00075 OneZero filter_; 00076 Envelope envelope_; 00077 Noise noise_; 00078 SineWave vibrato_; 00079 long length_; 00080 StkFloat outputGain_; 00081 StkFloat noiseGain_; 00082 StkFloat vibratoGain_; 00083 00084 }; 00085 00086 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |