Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Sitar.h

00001 /***************************************************/
00018 /***************************************************/
00019 
00020 #if !defined(__SITAR_H)
00021 #define __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(MY_FLOAT lowestFrequency);
00034 
00036   ~Sitar();
00037 
00039   void clear();
00040 
00042   void setFrequency(MY_FLOAT frequency);
00043 
00045   void pluck(MY_FLOAT amplitude);
00046 
00048   void noteOn(MY_FLOAT frequency, MY_FLOAT amplitude);
00049 
00051   void noteOff(MY_FLOAT amplitude);
00052 
00054   MY_FLOAT tick();
00055 
00056  protected:  
00057   DelayA *delayLine;
00058   OneZero *loopFilter;
00059   Noise *noise;
00060   ADSR *envelope;
00061   long length;
00062   MY_FLOAT loopGain;
00063   MY_FLOAT amGain;
00064   MY_FLOAT delay;
00065   MY_FLOAT targetDelay;
00066 
00067 };
00068 
00069 #endif
00070 

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