Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00014 /***************************************************/ 00015 00016 #if !defined(__SINGWAVE_H) 00017 #define __SINGWAVE_H 00018 00019 #include "WaveLoop.h" 00020 #include "Modulate.h" 00021 #include "Envelope.h" 00022 00023 class SingWave : public Stk 00024 { 00025 public: 00027 00031 SingWave(const char *fileName, bool raw=FALSE); 00032 00034 ~SingWave(); 00035 00037 void reset(); 00038 00040 void normalize(); 00041 00043 void normalize(MY_FLOAT peak); 00044 00046 void setFrequency(MY_FLOAT frequency); 00047 00049 void setVibratoRate(MY_FLOAT aRate); 00050 00052 void setVibratoGain(MY_FLOAT gain); 00053 00055 void setRandomGain(MY_FLOAT gain); 00056 00058 void setSweepRate(MY_FLOAT aRate); 00059 00061 void setGainRate(MY_FLOAT aRate); 00062 00064 void setGainTarget(MY_FLOAT target); 00065 00067 void noteOn(); 00068 00070 void noteOff(); 00071 00073 MY_FLOAT lastOut(); 00074 00076 MY_FLOAT tick(); 00077 00078 protected: 00079 00080 WaveLoop *wave; 00081 Modulate *modulator; 00082 Envelope *envelope; 00083 Envelope *pitchEnvelope; 00084 MY_FLOAT rate; 00085 MY_FLOAT sweepRate; 00086 MY_FLOAT lastOutput; 00087 00088 }; 00089 00090 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |