Home Information Classes Download Usage Mail List Requirements Links FAQ 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 00053 protected: 00054 00055 StkFloat computeSample( void ); 00056 00057 DelayA delayLine_; 00058 OneZero loopFilter_; 00059 Noise noise_; 00060 ADSR envelope_; 00061 00062 StkFloat loopGain_; 00063 StkFloat amGain_; 00064 StkFloat delay_; 00065 StkFloat targetDelay_; 00066 00067 }; 00068 00069 #endif 00070
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |