Home Information Classes Download Usage Mail List Requirements Links Tutorial

# Whistle.h

    00001 /***************************************************/
    00017 /***************************************************/
    00018
    00019 #if !defined(__WHISTLE_H)
    00020 #define __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   Whistle();
    00035
    00037   ~Whistle();
    00038
    00040   void clear();
    00041
    00043   void setFrequency(MY_FLOAT frequency);
    00044
    00046   void startBlowing(MY_FLOAT amplitude, MY_FLOAT rate);
    00047
    00049   void stopBlowing(MY_FLOAT rate);
    00050
    00052   void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude);
    00053
    00055   void noteOff(MY_FLOAT amplitude);
    00056
    00058   MY_FLOAT tick();
    00059
    00061   void controlChange(int number, MY_FLOAT value);
    00062
    00063 protected:
    00064         Vector3D *tempVectorP;
    00065   Vector3D *tempVector;
    00066   OnePole onepole;
    00067   Noise noise;
    00068         Envelope envelope;
    00069   Sphere *can;           // Declare a Spherical "can".
    00070   Sphere *pea, *bumper;  // One spherical "pea", and a spherical "bumper".
    00071
    00072   WaveLoop *sine;
    00073
    00074   MY_FLOAT baseFrequency;
    00075         MY_FLOAT maxPressure;
    00076   MY_FLOAT noiseGain;
    00077   MY_FLOAT fippleFreqMod;
    00078         MY_FLOAT fippleGainMod;
    00079         MY_FLOAT blowFreqMod;
    00080         MY_FLOAT tickSize;
    00081         MY_FLOAT canLoss;
    00082         int subSample, subSampCount;
    00083 };
    00084
    00085 #endif

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