Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Flute.h

00001 /***************************************************/
00023 /***************************************************/
00024 
00025 #ifndef STK_FLUTE_H
00026 #define STK_FLUTE_H
00027 
00028 #include "Instrmnt.h"
00029 #include "JetTable.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 
00044   Flute(StkFloat lowestFrequency);
00045 
00047   ~Flute();
00048 
00050   void clear();
00051 
00053   void setFrequency(StkFloat frequency);
00054 
00056   void setJetReflection(StkFloat coefficient);
00057 
00059   void setEndReflection(StkFloat coefficient);
00060 
00062   void setJetDelay(StkFloat aRatio);
00063 
00065   void startBlowing(StkFloat amplitude, StkFloat rate);
00066 
00068   void stopBlowing(StkFloat rate);
00069 
00071   void noteOn(StkFloat frequency, StkFloat amplitude);
00072 
00074   void noteOff(StkFloat amplitude);
00075 
00077   StkFloat tick();
00078 
00080   StkFloat *tick(StkFloat *vector, unsigned int vectorSize);
00081 
00083 
00089   StkFrames& tick( StkFrames& frames, unsigned int channel = 1 );
00090 
00092   void controlChange(int number, StkFloat value);
00093 
00094  protected:  
00095   DelayL   jetDelay_;
00096   DelayL   boreDelay_;
00097   JetTable jetTable_;
00098   OnePole  filter_;
00099   PoleZero dcBlock_;
00100   Noise    noise_;
00101   ADSR     adsr_;
00102   WaveLoop *vibrato_;
00103   unsigned long length_;
00104   StkFloat lastFrequency_;
00105   StkFloat maxPressure_;
00106   StkFloat jetReflection_;
00107   StkFloat endReflection_;
00108   StkFloat noiseGain_;
00109   StkFloat vibratoGain_;
00110   StkFloat outputGain_;
00111   StkFloat jetRatio_;
00112 
00113 };
00114 
00115 #endif

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