Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00017 /***************************************************/ 00018 00019 #ifndef STK_WHISTLE_H 00020 #define STK_WHISTLE_H 00021 00022 #include "Instrmnt.h" 00023 #include "Sphere.h" 00024 #include "Vector3D.h" 00025 #include "Noise.h" 00026 #include "WaveLoop.h" 00027 #include "OnePole.h" 00028 #include "Envelope.h" 00029 00030 class Whistle : public Instrmnt 00031 { 00032 public: 00034 00037 Whistle(); 00038 00040 ~Whistle(); 00041 00043 void clear(); 00044 00046 void setFrequency(StkFloat frequency); 00047 00049 void startBlowing(StkFloat amplitude, StkFloat rate); 00050 00052 void stopBlowing(StkFloat rate); 00053 00055 void noteOn(StkFloat frequency, StkFloat amplitude); 00056 00058 void noteOff(StkFloat amplitude); 00059 00061 StkFloat tick(); 00062 00064 StkFloat *tick(StkFloat *vector, unsigned int vectorSize); 00065 00067 00073 StkFrames& tick( StkFrames& frames, unsigned int channel = 1 ); 00074 00076 void controlChange(int number, StkFloat value); 00077 00078 protected: 00079 00080 Vector3D *tempVectorP_; 00081 Vector3D tempVector_; 00082 OnePole onepole_; 00083 Noise noise_; 00084 Envelope envelope_; 00085 Sphere can_; // Declare a Spherical "can". 00086 Sphere pea_, bumper_; // One spherical "pea", and a spherical "bumper". 00087 00088 WaveLoop *sine_; 00089 00090 StkFloat baseFrequency_; 00091 StkFloat noiseGain_; 00092 StkFloat fippleFreqMod_; 00093 StkFloat fippleGainMod_; 00094 StkFloat blowFreqMod_; 00095 StkFloat tickSize_; 00096 StkFloat canLoss_; 00097 int subSample_, subSampCount_; 00098 }; 00099 00100 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |