2010-01-13 10:35:51 +00:00
|
|
|
#define VOICE_OSCILLATORS 4
|
2010-01-13 17:05:00 +00:00
|
|
|
#define VOICE_FILTERS 2
|
2010-01-13 10:35:51 +00:00
|
|
|
|
|
|
|
struct voice_t
|
|
|
|
{
|
|
|
|
bool playing;
|
|
|
|
uint8_t note;
|
|
|
|
uint32_t sample;
|
|
|
|
uint32_t released;
|
|
|
|
|
|
|
|
double velocity;
|
|
|
|
struct osc_t osc[VOICE_OSCILLATORS];
|
|
|
|
|
2010-01-20 07:49:38 +00:00
|
|
|
//struct filter_t fil[VOICE_FILTERS];
|
|
|
|
struct bw_filter_t bw[VOICE_FILTERS];
|
2010-01-13 10:35:51 +00:00
|
|
|
};
|
|
|
|
|
2010-01-13 17:05:00 +00:00
|
|
|
void voice_init(struct voice_t *voice, double freq);
|
2010-01-13 10:35:51 +00:00
|
|
|
void voice_run(struct voice_t *voice, uint32_t samples, float *left, float *right);
|