psyn/engine.h

32 lines
914 B
C
Raw Normal View History

2010-01-13 10:35:51 +00:00
#define NUM_LFO 4
#define NUM_POLYPHONY 32
struct engine_t
{
2010-01-20 07:49:38 +00:00
struct control_t lowpass;
struct control_t modwheel;
struct control_t pitchbend;
struct control_t aftertouch;
struct control_t osc_shape[4];
struct control_t osc_level[4];
int monosynth;
2010-01-13 10:35:51 +00:00
struct osc_t osc[NUM_LFO];
struct voice_t voice[NUM_POLYPHONY];
};
2010-01-20 07:49:38 +00:00
extern struct engine_t _engine;
2010-01-13 10:35:51 +00:00
void engine_init();
void engine_run(struct engine_t *engine, uint32_t samples, float *left, float *right);
void engine_startvoice(struct engine_t *engine, uint8_t note, uint8_t velocity);
void engine_endvoice(struct engine_t *engine, uint8_t note, uint8_t velocity);
2010-01-20 07:49:38 +00:00
void engine_controlchange(struct engine_t *engine, uint8_t controller, uint8_t value);
void engine_programchange(struct engine_t *engine, uint8_t value);
void engine_aftertouch(struct engine_t *engine, uint8_t value);
void engine_pitchchange(struct engine_t *engine, int16_t value);