Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
00001 /***************************************************/ 00014 /***************************************************/ 00015 00016 #ifndef STK_SINGWAVE_H 00017 #define STK_SINGWAVE_H 00018 00019 #include "WaveLoop.h" 00020 #include "Modulate.h" 00021 #include "Envelope.h" 00022 00023 class SingWave : public Generator 00024 { 00025 public: 00027 00031 SingWave( std::string fileName, bool raw = false); 00032 00034 ~SingWave(); 00035 00037 void reset(); 00038 00040 void normalize(); 00041 00043 void normalize(StkFloat peak); 00044 00046 void setFrequency(StkFloat frequency); 00047 00049 void setVibratoRate(StkFloat rate); 00050 00052 void setVibratoGain(StkFloat gain); 00053 00055 void setRandomGain(StkFloat gain); 00056 00058 void setSweepRate(StkFloat rate); 00059 00061 void setGainRate(StkFloat rate); 00062 00064 void setGainTarget(StkFloat target); 00065 00067 void noteOn(); 00068 00070 void noteOff(); 00071 00072 protected: 00073 00074 StkFloat computeSample( void ); 00075 00076 WaveLoop *wave_; 00077 Modulate modulator_; 00078 Envelope envelope_; 00079 Envelope pitchEnvelope_; 00080 StkFloat rate_; 00081 StkFloat sweepRate_; 00082 00083 }; 00084 00085 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |