Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
00001 /***************************************************/ 00023 /***************************************************/ 00024 00025 #ifndef STK_FLUTE_H 00026 #define STK_FLUTE_H 00027 00028 #include "Instrmnt.h" 00029 #include "JetTable.h" 00030 #include "DelayL.h" 00031 #include "OnePole.h" 00032 #include "PoleZero.h" 00033 #include "Noise.h" 00034 #include "ADSR.h" 00035 #include "SineWave.h" 00036 00037 class Flute : public Instrmnt 00038 { 00039 public: 00041 00044 Flute(StkFloat lowestFrequency); 00045 00047 ~Flute(); 00048 00050 void clear(); 00051 00053 void setFrequency(StkFloat frequency); 00054 00056 void setJetReflection(StkFloat coefficient); 00057 00059 void setEndReflection(StkFloat coefficient); 00060 00062 void setJetDelay(StkFloat aRatio); 00063 00065 void startBlowing(StkFloat amplitude, StkFloat rate); 00066 00068 void stopBlowing(StkFloat rate); 00069 00071 void noteOn(StkFloat frequency, StkFloat amplitude); 00072 00074 void noteOff(StkFloat amplitude); 00075 00077 void controlChange(int number, StkFloat value); 00078 00079 protected: 00080 00081 StkFloat computeSample( void ); 00082 00083 DelayL jetDelay_; 00084 DelayL boreDelay_; 00085 JetTable jetTable_; 00086 OnePole filter_; 00087 PoleZero dcBlock_; 00088 Noise noise_; 00089 ADSR adsr_; 00090 SineWave vibrato_; 00091 unsigned long length_; 00092 StkFloat lastFrequency_; 00093 StkFloat maxPressure_; 00094 StkFloat jetReflection_; 00095 StkFloat endReflection_; 00096 StkFloat noiseGain_; 00097 StkFloat vibratoGain_; 00098 StkFloat outputGain_; 00099 StkFloat jetRatio_; 00100 00101 }; 00102 00103 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |