Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00018 /***************************************************/ 00019 00020 #ifndef STK_SITAR_H 00021 #define STK_SITAR_H 00022 00023 #include "Instrmnt.h" 00024 #include "DelayA.h" 00025 #include "OneZero.h" 00026 #include "Noise.h" 00027 #include "ADSR.h" 00028 00029 class Sitar : public Instrmnt 00030 { 00031 public: 00033 Sitar( StkFloat lowestFrequency = 20 ); 00034 00036 ~Sitar(); 00037 00039 void clear(); 00040 00042 void setFrequency(StkFloat frequency); 00043 00045 void pluck(StkFloat amplitude); 00046 00048 void noteOn(StkFloat frequency, StkFloat amplitude); 00049 00051 void noteOff(StkFloat amplitude); 00052 00054 StkFloat tick(); 00055 00057 StkFloat *tick(StkFloat *vector, unsigned int vectorSize); 00058 00060 00066 StkFrames& tick( StkFrames& frames, unsigned int channel = 1 ); 00067 00068 protected: 00069 DelayA delayLine_; 00070 OneZero loopFilter_; 00071 Noise noise_; 00072 ADSR envelope_; 00073 00074 StkFloat loopGain_; 00075 StkFloat amGain_; 00076 StkFloat delay_; 00077 StkFloat targetDelay_; 00078 00079 }; 00080 00081 #endif 00082
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |