Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00016 /***************************************************/ 00017 00018 #ifndef STK_DRUMMER_H 00019 #define STK_DRUMMER_H 00020 00021 #include "Instrmnt.h" 00022 #include "WvIn.h" 00023 #include "OnePole.h" 00024 00025 const int DRUM_NUMWAVES = 11; 00026 const int DRUM_POLYPHONY = 4; 00027 00028 class Drummer : public Instrmnt 00029 { 00030 public: 00032 00035 Drummer(); 00036 00038 ~Drummer(); 00039 00041 00047 void noteOn(StkFloat instrument, StkFloat amplitude); 00048 00050 void noteOff(StkFloat amplitude); 00051 00053 StkFloat tick(); 00054 00056 StkFloat *tick(StkFloat *vector, unsigned int vectorSize); 00057 00059 00065 StkFrames& tick( StkFrames& frames, unsigned int channel = 1 ); 00066 00067 protected: 00068 WvIn *waves_[DRUM_POLYPHONY]; 00069 OnePole *filters_[DRUM_POLYPHONY]; 00070 int sounding_[DRUM_POLYPHONY]; 00071 int nSounding_; 00072 }; 00073 00074 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |