Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Whistle.h

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 "SineWave.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   void controlChange(int number, StkFloat value);
00062 
00063 protected:
00064 
00065   StkFloat computeSample( void );
00066 
00067          Vector3D *tempVectorP_;
00068   Vector3D tempVector_;
00069   OnePole onepole_;
00070   Noise noise_;
00071          Envelope envelope_;
00072   Sphere can_;           // Declare a Spherical "can".
00073   Sphere pea_, bumper_;  // One spherical "pea", and a spherical "bumper".
00074 
00075   SineWave sine_;
00076 
00077   StkFloat baseFrequency_;
00078   StkFloat noiseGain_;
00079   StkFloat fippleFreqMod_;
00080          StkFloat fippleGainMod_;
00081          StkFloat blowFreqMod_;
00082          StkFloat tickSize_;
00083          StkFloat canLoss_;
00084          int subSample_, subSampCount_;
00085 };
00086 
00087 #endif

The Synthesis ToolKit in C++ (STK)
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.