1
/*******************************************/
2
/* Master Class for Drum Synthesizer */
3
/* by Perry R. Cook, 1995-96 */
5
/* This instrument contains a bunch of */
6
/* RawWvIn objects, run through a bunch */
7
/* of one-pole filters. All the */
8
/* corresponding rawwave files have been */
9
/* sampled at 22050 Hz. Thus, if the */
10
/* compile-time SRATE = 22050, then */
11
/* no interpolation is used. Otherwise, */
12
/* the rawwave data is appropriately */
13
/* interpolated for the current SRATE. */
14
/* You can specify the maximum Polyphony */
15
/* (maximum number of simultaneous voices)*/
16
/* in a #define in the .h file. */
18
/* Modified for RawWvIn class */
19
/* by Gary P. Scavone (4/99) */
20
/*******************************************/
22
#if !defined(__DrumSynt_h)
29
#define DRUM_NUMWAVES 11
30
#define DRUM_POLYPHONY 4
32
class DrumSynt : public Instrmnt
35
RawWvIn *waves[DRUM_POLYPHONY];
36
OnePole *filters[DRUM_POLYPHONY];
37
int sounding[DRUM_POLYPHONY];
42
virtual void noteOn(MY_FLOAT freq, MY_FLOAT amp);
43
void noteOff(MY_FLOAT amp);
44
virtual MY_FLOAT tick();