From c161e1016a04566a56b4858ea43502fed88dcc7f Mon Sep 17 00:00:00 2001 From: gramanas Date: Thu, 20 Apr 2023 18:24:49 +0300 Subject: Add midi --- src/synth_engine.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/synth_engine.h') diff --git a/src/synth_engine.h b/src/synth_engine.h index 1191892..86cfe1a 100644 --- a/src/synth_engine.h +++ b/src/synth_engine.h @@ -40,6 +40,8 @@ typedef struct { typedef struct { int sample_rate_divider; + float wave[1000200]; + int wi; } viz_t; typedef struct { @@ -47,10 +49,6 @@ typedef struct { float gain; float x; - int notes_active; - float freq[100]; - unsigned long long freq_count[100]; - note_t n; adsr_t adsr; @@ -78,6 +76,7 @@ typedef struct { float adsr_amplitude(void *synthData, unsigned long long elapsed); float make_sample(unsigned long long phase, void *synthData, unsigned int sample_rate, int viz); void init_synth(synth_t * synth); +void free_synth(synth_t * synth); int sound_gen(const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo* timeInfo, -- cgit v1.2.3