psyn/voice.h

18 lines
297 B
C

#define VOICE_OSCILLATORS 4
struct voice_t
{
bool playing;
uint8_t note;
uint32_t sample;
uint32_t released;
double velocity;
struct osc_t osc[VOICE_OSCILLATORS];
double last_l;
double last_r;
};
void voice_run(struct voice_t *voice, uint32_t samples, float *left, float *right);