Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


VoicForm.h

00001 /***************************************************/
00026 /***************************************************/
00027 
00028 #ifndef STK_VOICFORM_H
00029 #define STK_VOICFORM_H
00030 
00031 #include "Instrmnt.h"
00032 #include "Envelope.h"
00033 #include "Noise.h"
00034 #include "SingWave.h"
00035 #include "FormSwep.h"
00036 #include "OnePole.h"
00037 #include "OneZero.h"
00038 
00039 class VoicForm : public Instrmnt
00040 {
00041   public:
00043 
00046   VoicForm();
00047 
00049   ~VoicForm();
00050 
00052   void clear();
00053 
00055   void setFrequency(StkFloat frequency);
00056 
00058   bool setPhoneme(const char* phoneme);
00059 
00061   void setVoiced(StkFloat vGain);
00062 
00064   void setUnVoiced(StkFloat nGain);
00065 
00067   void setFilterSweepRate(unsigned int whichOne, StkFloat rate);
00068 
00070   void setPitchSweepRate(StkFloat rate);
00071 
00073   void speak();
00074 
00076   void quiet();
00077 
00079   void noteOn(StkFloat frequency, StkFloat amplitude);
00080 
00082   void noteOff(StkFloat amplitude);
00083 
00085   void controlChange(int number, StkFloat value);
00086 
00087 protected:
00088 
00089   StkFloat computeSample( void );
00090 
00091   SingWave *voiced_;
00092   Noise    noise_;
00093   Envelope noiseEnv_;
00094   FormSwep filters_[4];
00095   OnePole  onepole_;
00096   OneZero  onezero_;
00097 
00098 };
00099 
00100 #endif

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