Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Drummer.h

00001 /***************************************************/
00016 /***************************************************/
00017 
00018 #if !defined(__DRUMMER_H)
00019 #define __DRUMMER_H
00020 
00021 #include "Instrmnt.h"
00022 #include "WvIn.h"
00023 #include "OnePole.h"
00024 
00025 #define DRUM_NUMWAVES 11
00026 #define DRUM_POLYPHONY 4
00027 
00028 class Drummer : public Instrmnt
00029 {
00030  public:
00032   Drummer();
00033 
00035   ~Drummer();
00036 
00038 
00043   void noteOn(MY_FLOAT instrument, MY_FLOAT amplitude);
00044 
00046   void noteOff(MY_FLOAT amplitude);
00047 
00049   MY_FLOAT tick();
00050 
00051  protected:  
00052   WvIn    *waves[DRUM_POLYPHONY];
00053   OnePole *filters[DRUM_POLYPHONY];
00054   int      sounding[DRUM_POLYPHONY];
00055   int      nSounding;
00056 
00057 };
00058 
00059 #endif

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