Home Information Classes Download Usage Mail List Requirements Links Tutorial

# Flute.h

    00001 /***************************************************/
    00023 /***************************************************/
    00024
    00025 #if !defined(__FLUTE_H)
    00026 #define __FLUTE_H
    00027
    00028 #include "Instrmnt.h"
    00029 #include "JetTabl.h"
    00030 #include "DelayL.h"
    00031 #include "OnePole.h"
    00032 #include "PoleZero.h"
    00033 #include "Noise.h"
    00034 #include "ADSR.h"
    00035 #include "WaveLoop.h"
    00036
    00037 class Flute : public Instrmnt
    00038 {
    00039  public:
    00041   Flute(MY_FLOAT lowestFrequency);
    00042
    00044   ~Flute();
    00045
    00047   void clear();
    00048
    00050   void setFrequency(MY_FLOAT frequency);
    00051
    00053   void setJetReflection(MY_FLOAT coefficient);
    00054
    00056   void setEndReflection(MY_FLOAT coefficient);
    00057
    00059   void setJetDelay(MY_FLOAT aRatio);
    00060
    00062   void startBlowing(MY_FLOAT amplitude, MY_FLOAT rate);
    00063
    00065   void stopBlowing(MY_FLOAT rate);
    00066
    00068   void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude);
    00069
    00071   void noteOff(MY_FLOAT amplitude);
    00072
    00074   MY_FLOAT tick();
    00075
    00077   void controlChange(int number, MY_FLOAT value);
    00078
    00079  protected:
    00080   DelayL *jetDelay;
    00081   DelayL *boreDelay;
    00082   JetTabl *jetTable;
    00083   OnePole *filter;
    00084   PoleZero *dcBlock;
    00085   Noise *noise;
    00086   ADSR *adsr;
    00087   WaveLoop *vibrato;
    00088   long length;
    00089   MY_FLOAT lastFrequency;
    00090   MY_FLOAT maxPressure;
    00091   MY_FLOAT jetReflection;
    00092   MY_FLOAT endReflection;
    00093   MY_FLOAT noiseGain;
    00094   MY_FLOAT vibratoGain;
    00095   MY_FLOAT outputGain;
    00096   MY_FLOAT jetRatio;
    00097
    00098 };
    00099
    00100 #endif

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