Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial

# Whistle.h

    00001 #ifndef STK_WHISTLE_H
    00002 #define STK_WHISTLE_H
    00003
    00004 #include "Instrmnt.h"
    00005 #include "Sphere.h"
    00006 #include "Vector3D.h"
    00007 #include "Noise.h"
    00008 #include "SineWave.h"
    00009 #include "OnePole.h"
    00010 #include "Envelope.h"
    00011
    00012 namespace stk {
    00013
    00014 /***************************************************/
    00030 /***************************************************/
    00031
    00032 class Whistle : public Instrmnt
    00033 {
    00034 public:
    00036
    00039   Whistle( void );
    00040
    00042   ~Whistle( void );
    00043
    00045   void clear( void );
    00046
    00048   void setFrequency( StkFloat frequency );
    00049
    00051   void startBlowing( StkFloat amplitude, StkFloat rate );
    00052
    00054   void stopBlowing( StkFloat rate );
    00055
    00057   void noteOn( StkFloat frequency, StkFloat amplitude );
    00058
    00060   void noteOff( StkFloat amplitude );
    00061
    00063   void controlChange( int number, StkFloat value );
    00064
    00066   StkFloat tick( unsigned int channel = 0 );
    00067
    00068 protected:
    00069
    00070          Vector3D *tempVectorP_;
    00071   Vector3D tempVector_;
    00072   OnePole onepole_;
    00073   Noise noise_;
    00074          Envelope envelope_;
    00075   Sphere can_;           // Declare a Spherical "can".
    00076   Sphere pea_, bumper_;  // One spherical "pea", and a spherical "bumper".
    00077
    00078   SineWave sine_;
    00079
    00080   StkFloat baseFrequency_;
    00081   StkFloat noiseGain_;
    00082   StkFloat fippleFreqMod_;
    00083          StkFloat fippleGainMod_;
    00084          StkFloat blowFreqMod_;
    00085          StkFloat tickSize_;
    00086          StkFloat canLoss_;
    00087          int subSample_, subSampCount_;
    00088 };
    00089
    00090 } // stk namespace
    00091 #endif

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